vrshoot

annotate libs/assimp/assimp/cimport.h @ 0:b2f14e535253

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 01 Feb 2014 19:58:19 +0200
parents
children
rev   line source
nuclear@0 1 /*
nuclear@0 2 ---------------------------------------------------------------------------
nuclear@0 3 Open Asset Import Library (assimp)
nuclear@0 4 ---------------------------------------------------------------------------
nuclear@0 5
nuclear@0 6 Copyright (c) 2006-2012, assimp team
nuclear@0 7
nuclear@0 8 All rights reserved.
nuclear@0 9
nuclear@0 10 Redistribution and use of this software in source and binary forms,
nuclear@0 11 with or without modification, are permitted provided that the following
nuclear@0 12 conditions are met:
nuclear@0 13
nuclear@0 14 * Redistributions of source code must retain the above
nuclear@0 15 copyright notice, this list of conditions and the
nuclear@0 16 following disclaimer.
nuclear@0 17
nuclear@0 18 * Redistributions in binary form must reproduce the above
nuclear@0 19 copyright notice, this list of conditions and the
nuclear@0 20 following disclaimer in the documentation and/or other
nuclear@0 21 materials provided with the distribution.
nuclear@0 22
nuclear@0 23 * Neither the name of the assimp team, nor the names of its
nuclear@0 24 contributors may be used to endorse or promote products
nuclear@0 25 derived from this software without specific prior
nuclear@0 26 written permission of the assimp team.
nuclear@0 27
nuclear@0 28 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
nuclear@0 29 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
nuclear@0 30 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
nuclear@0 31 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
nuclear@0 32 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
nuclear@0 33 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
nuclear@0 34 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
nuclear@0 35 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
nuclear@0 36 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
nuclear@0 37 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
nuclear@0 38 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
nuclear@0 39 ---------------------------------------------------------------------------
nuclear@0 40 */
nuclear@0 41
nuclear@0 42 /** @file assimp.h
nuclear@0 43 * @brief Defines the C-API to the Open Asset Import Library.
nuclear@0 44 */
nuclear@0 45 #ifndef AI_ASSIMP_H_INC
nuclear@0 46 #define AI_ASSIMP_H_INC
nuclear@0 47 #include "types.h"
nuclear@0 48
nuclear@0 49 #ifdef __cplusplus
nuclear@0 50 extern "C" {
nuclear@0 51 #endif
nuclear@0 52
nuclear@0 53 struct aiScene; // aiScene.h
nuclear@0 54 struct aiFileIO; // aiFileIO.h
nuclear@0 55 typedef void (*aiLogStreamCallback)(const char* /* message */, char* /* user */);
nuclear@0 56
nuclear@0 57 // --------------------------------------------------------------------------------
nuclear@0 58 /** C-API: Represents a log stream. A log stream receives all log messages and
nuclear@0 59 * streams them _somewhere_.
nuclear@0 60 * @see aiGetPredefinedLogStream
nuclear@0 61 * @see aiAttachLogStream
nuclear@0 62 * @see aiDetachLogStream */
nuclear@0 63 // --------------------------------------------------------------------------------
nuclear@0 64 struct aiLogStream
nuclear@0 65 {
nuclear@0 66 /** callback to be called */
nuclear@0 67 aiLogStreamCallback callback;
nuclear@0 68
nuclear@0 69 /** user data to be passed to the callback */
nuclear@0 70 char* user;
nuclear@0 71 };
nuclear@0 72
nuclear@0 73
nuclear@0 74 // --------------------------------------------------------------------------------
nuclear@0 75 /** C-API: Represents an opaque set of settings to be used during importing.
nuclear@0 76 * @see aiCreatePropertyStore
nuclear@0 77 * @see aiReleasePropertyStore
nuclear@0 78 * @see aiImportFileExWithProperties
nuclear@0 79 * @see aiSetPropertyInteger
nuclear@0 80 * @see aiSetPropertyFloat
nuclear@0 81 * @see aiSetPropertyString
nuclear@0 82 */
nuclear@0 83 // --------------------------------------------------------------------------------
nuclear@0 84 struct aiPropertyStore { char sentinel; };
nuclear@0 85
nuclear@0 86 /** Our own C boolean type */
nuclear@0 87 typedef int aiBool;
nuclear@0 88
nuclear@0 89 #define AI_FALSE 0
nuclear@0 90 #define AI_TRUE 1
nuclear@0 91
nuclear@0 92 // --------------------------------------------------------------------------------
nuclear@0 93 /** Reads the given file and returns its content.
nuclear@0 94 *
nuclear@0 95 * If the call succeeds, the imported data is returned in an aiScene structure.
nuclear@0 96 * The data is intended to be read-only, it stays property of the ASSIMP
nuclear@0 97 * library and will be stable until aiReleaseImport() is called. After you're
nuclear@0 98 * done with it, call aiReleaseImport() to free the resources associated with
nuclear@0 99 * this file. If the import fails, NULL is returned instead. Call
nuclear@0 100 * aiGetErrorString() to retrieve a human-readable error text.
nuclear@0 101 * @param pFile Path and filename of the file to be imported,
nuclear@0 102 * expected to be a null-terminated c-string. NULL is not a valid value.
nuclear@0 103 * @param pFlags Optional post processing steps to be executed after
nuclear@0 104 * a successful import. Provide a bitwise combination of the
nuclear@0 105 * #aiPostProcessSteps flags.
nuclear@0 106 * @return Pointer to the imported data or NULL if the import failed.
nuclear@0 107 */
nuclear@0 108 ASSIMP_API const C_STRUCT aiScene* aiImportFile(
nuclear@0 109 const char* pFile,
nuclear@0 110 unsigned int pFlags);
nuclear@0 111
nuclear@0 112 // --------------------------------------------------------------------------------
nuclear@0 113 /** Reads the given file using user-defined I/O functions and returns
nuclear@0 114 * its content.
nuclear@0 115 *
nuclear@0 116 * If the call succeeds, the imported data is returned in an aiScene structure.
nuclear@0 117 * The data is intended to be read-only, it stays property of the ASSIMP
nuclear@0 118 * library and will be stable until aiReleaseImport() is called. After you're
nuclear@0 119 * done with it, call aiReleaseImport() to free the resources associated with
nuclear@0 120 * this file. If the import fails, NULL is returned instead. Call
nuclear@0 121 * aiGetErrorString() to retrieve a human-readable error text.
nuclear@0 122 * @param pFile Path and filename of the file to be imported,
nuclear@0 123 * expected to be a null-terminated c-string. NULL is not a valid value.
nuclear@0 124 * @param pFlags Optional post processing steps to be executed after
nuclear@0 125 * a successful import. Provide a bitwise combination of the
nuclear@0 126 * #aiPostProcessSteps flags.
nuclear@0 127 * @param pFS aiFileIO structure. Will be used to open the model file itself
nuclear@0 128 * and any other files the loader needs to open. Pass NULL to use the default
nuclear@0 129 * implementation.
nuclear@0 130 * @return Pointer to the imported data or NULL if the import failed.
nuclear@0 131 * @note Include <aiFileIO.h> for the definition of #aiFileIO.
nuclear@0 132 */
nuclear@0 133 ASSIMP_API const C_STRUCT aiScene* aiImportFileEx(
nuclear@0 134 const char* pFile,
nuclear@0 135 unsigned int pFlags,
nuclear@0 136 C_STRUCT aiFileIO* pFS);
nuclear@0 137
nuclear@0 138 // --------------------------------------------------------------------------------
nuclear@0 139 /** Same as #aiImportFileEx, but adds an extra parameter containing importer settings.
nuclear@0 140 *
nuclear@0 141 * @param pProps #aiPropertyStore instance containing import settings.
nuclear@0 142 * @see aiImportFileEx
nuclear@0 143 */
nuclear@0 144 ASSIMP_API const C_STRUCT aiScene* aiImportFileExWithProperties(
nuclear@0 145 const char* pFile,
nuclear@0 146 unsigned int pFlags,
nuclear@0 147 C_STRUCT aiFileIO* pFS,
nuclear@0 148 const C_STRUCT aiPropertyStore* pProps);
nuclear@0 149
nuclear@0 150 // --------------------------------------------------------------------------------
nuclear@0 151 /** Reads the given file from a given memory buffer,
nuclear@0 152 *
nuclear@0 153 * If the call succeeds, the contents of the file are returned as a pointer to an
nuclear@0 154 * aiScene object. The returned data is intended to be read-only, the importer keeps
nuclear@0 155 * ownership of the data and will destroy it upon destruction. If the import fails,
nuclear@0 156 * NULL is returned.
nuclear@0 157 * A human-readable error description can be retrieved by calling aiGetErrorString().
nuclear@0 158 * @param pBuffer Pointer to the file data
nuclear@0 159 * @param pLength Length of pBuffer, in bytes
nuclear@0 160 * @param pFlags Optional post processing steps to be executed after
nuclear@0 161 * a successful import. Provide a bitwise combination of the
nuclear@0 162 * #aiPostProcessSteps flags. If you wish to inspect the imported
nuclear@0 163 * scene first in order to fine-tune your post-processing setup,
nuclear@0 164 * consider to use #aiApplyPostProcessing().
nuclear@0 165 * @param pHint An additional hint to the library. If this is a non empty string,
nuclear@0 166 * the library looks for a loader to support the file extension specified by pHint
nuclear@0 167 * and passes the file to the first matching loader. If this loader is unable to
nuclear@0 168 * completely the request, the library continues and tries to determine the file
nuclear@0 169 * format on its own, a task that may or may not be successful.
nuclear@0 170 * Check the return value, and you'll know ...
nuclear@0 171 * @return A pointer to the imported data, NULL if the import failed.
nuclear@0 172 *
nuclear@0 173 * @note This is a straightforward way to decode models from memory
nuclear@0 174 * buffers, but it doesn't handle model formats that spread their
nuclear@0 175 * data across multiple files or even directories. Examples include
nuclear@0 176 * OBJ or MD3, which outsource parts of their material info into
nuclear@0 177 * external scripts. If you need full functionality, provide
nuclear@0 178 * a custom IOSystem to make Assimp find these files and use
nuclear@0 179 * the regular aiImportFileEx()/aiImportFileExWithProperties() API.
nuclear@0 180 */
nuclear@0 181 ASSIMP_API const C_STRUCT aiScene* aiImportFileFromMemory(
nuclear@0 182 const char* pBuffer,
nuclear@0 183 unsigned int pLength,
nuclear@0 184 unsigned int pFlags,
nuclear@0 185 const char* pHint);
nuclear@0 186
nuclear@0 187 // --------------------------------------------------------------------------------
nuclear@0 188 /** Same as #aiImportFileFromMemory, but adds an extra parameter containing importer settings.
nuclear@0 189 *
nuclear@0 190 * @param pProps #aiPropertyStore instance containing import settings.
nuclear@0 191 * @see aiImportFileFromMemory
nuclear@0 192 */
nuclear@0 193 ASSIMP_API const C_STRUCT aiScene* aiImportFileFromMemoryWithProperties(
nuclear@0 194 const char* pBuffer,
nuclear@0 195 unsigned int pLength,
nuclear@0 196 unsigned int pFlags,
nuclear@0 197 const char* pHint,
nuclear@0 198 const C_STRUCT aiPropertyStore* pProps);
nuclear@0 199
nuclear@0 200 // --------------------------------------------------------------------------------
nuclear@0 201 /** Apply post-processing to an already-imported scene.
nuclear@0 202 *
nuclear@0 203 * This is strictly equivalent to calling #aiImportFile()/#aiImportFileEx with the
nuclear@0 204 * same flags. However, you can use this separate function to inspect the imported
nuclear@0 205 * scene first to fine-tune your post-processing setup.
nuclear@0 206 * @param pScene Scene to work on.
nuclear@0 207 * @param pFlags Provide a bitwise combination of the #aiPostProcessSteps flags.
nuclear@0 208 * @return A pointer to the post-processed data. Post processing is done in-place,
nuclear@0 209 * meaning this is still the same #aiScene which you passed for pScene. However,
nuclear@0 210 * _if_ post-processing failed, the scene could now be NULL. That's quite a rare
nuclear@0 211 * case, post processing steps are not really designed to 'fail'. To be exact,
nuclear@0 212 * the #aiProcess_ValidateDS flag is currently the only post processing step
nuclear@0 213 * which can actually cause the scene to be reset to NULL.
nuclear@0 214 */
nuclear@0 215 ASSIMP_API const C_STRUCT aiScene* aiApplyPostProcessing(
nuclear@0 216 const C_STRUCT aiScene* pScene,
nuclear@0 217 unsigned int pFlags);
nuclear@0 218
nuclear@0 219 // --------------------------------------------------------------------------------
nuclear@0 220 /** Get one of the predefine log streams. This is the quick'n'easy solution to
nuclear@0 221 * access Assimp's log system. Attaching a log stream can slightly reduce Assimp's
nuclear@0 222 * overall import performance.
nuclear@0 223 *
nuclear@0 224 * Usage is rather simple (this will stream the log to a file, named log.txt, and
nuclear@0 225 * the stdout stream of the process:
nuclear@0 226 * @code
nuclear@0 227 * struct aiLogStream c;
nuclear@0 228 * c = aiGetPredefinedLogStream(aiDefaultLogStream_FILE,"log.txt");
nuclear@0 229 * aiAttachLogStream(&c);
nuclear@0 230 * c = aiGetPredefinedLogStream(aiDefaultLogStream_STDOUT,NULL);
nuclear@0 231 * aiAttachLogStream(&c);
nuclear@0 232 * @endcode
nuclear@0 233 *
nuclear@0 234 * @param pStreams One of the #aiDefaultLogStream enumerated values.
nuclear@0 235 * @param file Solely for the #aiDefaultLogStream_FILE flag: specifies the file to write to.
nuclear@0 236 * Pass NULL for all other flags.
nuclear@0 237 * @return The log stream. callback is set to NULL if something went wrong.
nuclear@0 238 */
nuclear@0 239 ASSIMP_API C_STRUCT aiLogStream aiGetPredefinedLogStream(
nuclear@0 240 C_ENUM aiDefaultLogStream pStreams,
nuclear@0 241 const char* file);
nuclear@0 242
nuclear@0 243 // --------------------------------------------------------------------------------
nuclear@0 244 /** Attach a custom log stream to the libraries' logging system.
nuclear@0 245 *
nuclear@0 246 * Attaching a log stream can slightly reduce Assimp's overall import
nuclear@0 247 * performance. Multiple log-streams can be attached.
nuclear@0 248 * @param stream Describes the new log stream.
nuclear@0 249 * @note To ensure proepr destruction of the logging system, you need to manually
nuclear@0 250 * call aiDetachLogStream() on every single log stream you attach.
nuclear@0 251 * Alternatively (for the lazy folks) #aiDetachAllLogStreams is provided.
nuclear@0 252 */
nuclear@0 253 ASSIMP_API void aiAttachLogStream(
nuclear@0 254 const C_STRUCT aiLogStream* stream);
nuclear@0 255
nuclear@0 256 // --------------------------------------------------------------------------------
nuclear@0 257 /** Enable verbose logging. Verbose logging includes debug-related stuff and
nuclear@0 258 * detailed import statistics. This can have severe impact on import performance
nuclear@0 259 * and memory consumption. However, it might be useful to find out why a file
nuclear@0 260 * didn't read correctly.
nuclear@0 261 * @param d AI_TRUE or AI_FALSE, your decision.
nuclear@0 262 */
nuclear@0 263 ASSIMP_API void aiEnableVerboseLogging(aiBool d);
nuclear@0 264
nuclear@0 265 // --------------------------------------------------------------------------------
nuclear@0 266 /** Detach a custom log stream from the libraries' logging system.
nuclear@0 267 *
nuclear@0 268 * This is the counterpart of #aiAttachPredefinedLogStream. If you attached a stream,
nuclear@0 269 * don't forget to detach it again.
nuclear@0 270 * @param stream The log stream to be detached.
nuclear@0 271 * @return AI_SUCCESS if the log stream has been detached successfully.
nuclear@0 272 * @see aiDetachAllLogStreams
nuclear@0 273 */
nuclear@0 274 ASSIMP_API C_ENUM aiReturn aiDetachLogStream(
nuclear@0 275 const C_STRUCT aiLogStream* stream);
nuclear@0 276
nuclear@0 277 // --------------------------------------------------------------------------------
nuclear@0 278 /** Detach all active log streams from the libraries' logging system.
nuclear@0 279 * This ensures that the logging system is terminated properly and all
nuclear@0 280 * resources allocated by it are actually freed. If you attached a stream,
nuclear@0 281 * don't forget to detach it again.
nuclear@0 282 * @see aiAttachLogStream
nuclear@0 283 * @see aiDetachLogStream
nuclear@0 284 */
nuclear@0 285 ASSIMP_API void aiDetachAllLogStreams(void);
nuclear@0 286
nuclear@0 287 // --------------------------------------------------------------------------------
nuclear@0 288 /** Releases all resources associated with the given import process.
nuclear@0 289 *
nuclear@0 290 * Call this function after you're done with the imported data.
nuclear@0 291 * @param pScene The imported data to release. NULL is a valid value.
nuclear@0 292 */
nuclear@0 293 ASSIMP_API void aiReleaseImport(
nuclear@0 294 const C_STRUCT aiScene* pScene);
nuclear@0 295
nuclear@0 296 // --------------------------------------------------------------------------------
nuclear@0 297 /** Returns the error text of the last failed import process.
nuclear@0 298 *
nuclear@0 299 * @return A textual description of the error that occurred at the last
nuclear@0 300 * import process. NULL if there was no error. There can't be an error if you
nuclear@0 301 * got a non-NULL #aiScene from #aiImportFile/#aiImportFileEx/#aiApplyPostProcessing.
nuclear@0 302 */
nuclear@0 303 ASSIMP_API const char* aiGetErrorString();
nuclear@0 304
nuclear@0 305 // --------------------------------------------------------------------------------
nuclear@0 306 /** Returns whether a given file extension is supported by ASSIMP
nuclear@0 307 *
nuclear@0 308 * @param szExtension Extension for which the function queries support for.
nuclear@0 309 * Must include a leading dot '.'. Example: ".3ds", ".md3"
nuclear@0 310 * @return AI_TRUE if the file extension is supported.
nuclear@0 311 */
nuclear@0 312 ASSIMP_API aiBool aiIsExtensionSupported(
nuclear@0 313 const char* szExtension);
nuclear@0 314
nuclear@0 315 // --------------------------------------------------------------------------------
nuclear@0 316 /** Get a list of all file extensions supported by ASSIMP.
nuclear@0 317 *
nuclear@0 318 * If a file extension is contained in the list this does, of course, not
nuclear@0 319 * mean that ASSIMP is able to load all files with this extension.
nuclear@0 320 * @param szOut String to receive the extension list.
nuclear@0 321 * Format of the list: "*.3ds;*.obj;*.dae". NULL is not a valid parameter.
nuclear@0 322 */
nuclear@0 323 ASSIMP_API void aiGetExtensionList(
nuclear@0 324 C_STRUCT aiString* szOut);
nuclear@0 325
nuclear@0 326 // --------------------------------------------------------------------------------
nuclear@0 327 /** Get the approximated storage required by an imported asset
nuclear@0 328 * @param pIn Input asset.
nuclear@0 329 * @param in Data structure to be filled.
nuclear@0 330 */
nuclear@0 331 ASSIMP_API void aiGetMemoryRequirements(
nuclear@0 332 const C_STRUCT aiScene* pIn,
nuclear@0 333 C_STRUCT aiMemoryInfo* in);
nuclear@0 334
nuclear@0 335
nuclear@0 336
nuclear@0 337 // --------------------------------------------------------------------------------
nuclear@0 338 /** Create an empty property store. Property stores are used to collect import
nuclear@0 339 * settings.
nuclear@0 340 * @return New property store. Property stores need to be manually destroyed using
nuclear@0 341 * the #aiReleasePropertyStore API function.
nuclear@0 342 */
nuclear@0 343 ASSIMP_API C_STRUCT aiPropertyStore* aiCreatePropertyStore(void);
nuclear@0 344
nuclear@0 345 // --------------------------------------------------------------------------------
nuclear@0 346 /** Delete a property store.
nuclear@0 347 * @param p Property store to be deleted.
nuclear@0 348 */
nuclear@0 349 ASSIMP_API void aiReleasePropertyStore(C_STRUCT aiPropertyStore* p);
nuclear@0 350
nuclear@0 351 // --------------------------------------------------------------------------------
nuclear@0 352 /** Set an integer property.
nuclear@0 353 *
nuclear@0 354 * This is the C-version of #Assimp::Importer::SetPropertyInteger(). In the C
nuclear@0 355 * interface, properties are always shared by all imports. It is not possible to
nuclear@0 356 * specify them per import.
nuclear@0 357 *
nuclear@0 358 * @param szName Name of the configuration property to be set. All supported
nuclear@0 359 * public properties are defined in the config.h header file (#AI_CONFIG_XXX).
nuclear@0 360 * @param value New value for the property
nuclear@0 361 */
nuclear@0 362 ASSIMP_API void aiSetImportPropertyInteger(
nuclear@0 363 C_STRUCT aiPropertyStore* store,
nuclear@0 364 const char* szName,
nuclear@0 365 int value);
nuclear@0 366
nuclear@0 367 // --------------------------------------------------------------------------------
nuclear@0 368 /** Set a floating-point property.
nuclear@0 369 *
nuclear@0 370 * This is the C-version of #Assimp::Importer::SetPropertyFloat(). In the C
nuclear@0 371 * interface, properties are always shared by all imports. It is not possible to
nuclear@0 372 * specify them per import.
nuclear@0 373 *
nuclear@0 374 * @param szName Name of the configuration property to be set. All supported
nuclear@0 375 * public properties are defined in the config.h header file (#AI_CONFIG_XXX).
nuclear@0 376 * @param value New value for the property
nuclear@0 377 */
nuclear@0 378 ASSIMP_API void aiSetImportPropertyFloat(
nuclear@0 379 C_STRUCT aiPropertyStore* store,
nuclear@0 380 const char* szName,
nuclear@0 381 float value);
nuclear@0 382
nuclear@0 383 // --------------------------------------------------------------------------------
nuclear@0 384 /** Set a string property.
nuclear@0 385 *
nuclear@0 386 * This is the C-version of #Assimp::Importer::SetPropertyString(). In the C
nuclear@0 387 * interface, properties are always shared by all imports. It is not possible to
nuclear@0 388 * specify them per import.
nuclear@0 389 *
nuclear@0 390 * @param property store to modify. Use #aiCreatePropertyStore to obtain a store.
nuclear@0 391 * @param szName Name of the configuration property to be set. All supported
nuclear@0 392 * public properties are defined in the config.h header file (#AI_CONFIG_XXX).
nuclear@0 393 * @param value New value for the property
nuclear@0 394 */
nuclear@0 395 ASSIMP_API void aiSetImportPropertyString(
nuclear@0 396 C_STRUCT aiPropertyStore* store,
nuclear@0 397 const char* szName,
nuclear@0 398 const C_STRUCT aiString* st);
nuclear@0 399
nuclear@0 400 // --------------------------------------------------------------------------------
nuclear@0 401 /** Construct a quaternion from a 3x3 rotation matrix.
nuclear@0 402 * @param quat Receives the output quaternion.
nuclear@0 403 * @param mat Matrix to 'quaternionize'.
nuclear@0 404 * @see aiQuaternion(const aiMatrix3x3& pRotMatrix)
nuclear@0 405 */
nuclear@0 406 ASSIMP_API void aiCreateQuaternionFromMatrix(
nuclear@0 407 C_STRUCT aiQuaternion* quat,
nuclear@0 408 const C_STRUCT aiMatrix3x3* mat);
nuclear@0 409
nuclear@0 410 // --------------------------------------------------------------------------------
nuclear@0 411 /** Decompose a transformation matrix into its rotational, translational and
nuclear@0 412 * scaling components.
nuclear@0 413 *
nuclear@0 414 * @param mat Matrix to decompose
nuclear@0 415 * @param scaling Receives the scaling component
nuclear@0 416 * @param rotation Receives the rotational component
nuclear@0 417 * @param position Receives the translational component.
nuclear@0 418 * @see aiMatrix4x4::Decompose (aiVector3D&, aiQuaternion&, aiVector3D&) const;
nuclear@0 419 */
nuclear@0 420 ASSIMP_API void aiDecomposeMatrix(
nuclear@0 421 const C_STRUCT aiMatrix4x4* mat,
nuclear@0 422 C_STRUCT aiVector3D* scaling,
nuclear@0 423 C_STRUCT aiQuaternion* rotation,
nuclear@0 424 C_STRUCT aiVector3D* position);
nuclear@0 425
nuclear@0 426 // --------------------------------------------------------------------------------
nuclear@0 427 /** Transpose a 4x4 matrix.
nuclear@0 428 * @param mat Pointer to the matrix to be transposed
nuclear@0 429 */
nuclear@0 430 ASSIMP_API void aiTransposeMatrix4(
nuclear@0 431 C_STRUCT aiMatrix4x4* mat);
nuclear@0 432
nuclear@0 433 // --------------------------------------------------------------------------------
nuclear@0 434 /** Transpose a 3x3 matrix.
nuclear@0 435 * @param mat Pointer to the matrix to be transposed
nuclear@0 436 */
nuclear@0 437 ASSIMP_API void aiTransposeMatrix3(
nuclear@0 438 C_STRUCT aiMatrix3x3* mat);
nuclear@0 439
nuclear@0 440 // --------------------------------------------------------------------------------
nuclear@0 441 /** Transform a vector by a 3x3 matrix
nuclear@0 442 * @param vec Vector to be transformed.
nuclear@0 443 * @param mat Matrix to transform the vector with.
nuclear@0 444 */
nuclear@0 445 ASSIMP_API void aiTransformVecByMatrix3(
nuclear@0 446 C_STRUCT aiVector3D* vec,
nuclear@0 447 const C_STRUCT aiMatrix3x3* mat);
nuclear@0 448
nuclear@0 449 // --------------------------------------------------------------------------------
nuclear@0 450 /** Transform a vector by a 4x4 matrix
nuclear@0 451 * @param vec Vector to be transformed.
nuclear@0 452 * @param mat Matrix to transform the vector with.
nuclear@0 453 */
nuclear@0 454 ASSIMP_API void aiTransformVecByMatrix4(
nuclear@0 455 C_STRUCT aiVector3D* vec,
nuclear@0 456 const C_STRUCT aiMatrix4x4* mat);
nuclear@0 457
nuclear@0 458 // --------------------------------------------------------------------------------
nuclear@0 459 /** Multiply two 4x4 matrices.
nuclear@0 460 * @param dst First factor, receives result.
nuclear@0 461 * @param src Matrix to be multiplied with 'dst'.
nuclear@0 462 */
nuclear@0 463 ASSIMP_API void aiMultiplyMatrix4(
nuclear@0 464 C_STRUCT aiMatrix4x4* dst,
nuclear@0 465 const C_STRUCT aiMatrix4x4* src);
nuclear@0 466
nuclear@0 467 // --------------------------------------------------------------------------------
nuclear@0 468 /** Multiply two 3x3 matrices.
nuclear@0 469 * @param dst First factor, receives result.
nuclear@0 470 * @param src Matrix to be multiplied with 'dst'.
nuclear@0 471 */
nuclear@0 472 ASSIMP_API void aiMultiplyMatrix3(
nuclear@0 473 C_STRUCT aiMatrix3x3* dst,
nuclear@0 474 const C_STRUCT aiMatrix3x3* src);
nuclear@0 475
nuclear@0 476 // --------------------------------------------------------------------------------
nuclear@0 477 /** Get a 3x3 identity matrix.
nuclear@0 478 * @param mat Matrix to receive its personal identity
nuclear@0 479 */
nuclear@0 480 ASSIMP_API void aiIdentityMatrix3(
nuclear@0 481 C_STRUCT aiMatrix3x3* mat);
nuclear@0 482
nuclear@0 483 // --------------------------------------------------------------------------------
nuclear@0 484 /** Get a 4x4 identity matrix.
nuclear@0 485 * @param mat Matrix to receive its personal identity
nuclear@0 486 */
nuclear@0 487 ASSIMP_API void aiIdentityMatrix4(
nuclear@0 488 C_STRUCT aiMatrix4x4* mat);
nuclear@0 489
nuclear@0 490
nuclear@0 491 #ifdef __cplusplus
nuclear@0 492 }
nuclear@0 493 #endif
nuclear@0 494
nuclear@0 495 #endif // AI_ASSIMP_H_INC