cimport.h 24 KB

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