Assimp v5.2.2 (January 2022)
The Asset-Importer-Lib API documentation.
cimport.h File Reference

Defines the C-API to the Open Asset Import Library. More...

Classes

struct  aiLogStream
 C-API: Represents a log stream. More...
 
struct  aiPropertyStore
 C-API: Represents an opaque set of settings to be used during importing. More...
 

Macros

#define AI_ASSIMP_H_INC
 
#define AI_FALSE   0
 
#define AI_TRUE   1
 

Typedefs

typedef int aiBool
 Our own C boolean type. More...
 
typedef void(* aiLogStreamCallback) (const char *, char *)
 

Functions

ASSIMP_API const C_STRUCT aiSceneaiApplyPostProcessing (const C_STRUCT aiScene *pScene, unsigned int pFlags)
 Apply post-processing to an already-imported scene. More...
 
ASSIMP_API void aiAttachLogStream (const C_STRUCT aiLogStream *stream)
 Attach a custom log stream to the libraries' logging system. More...
 
ASSIMP_API C_STRUCT aiPropertyStoreaiCreatePropertyStore (void)
 Create an empty property store. More...
 
ASSIMP_API void aiCreateQuaternionFromMatrix (C_STRUCT aiQuaternion *quat, const C_STRUCT aiMatrix3x3 *mat)
 Construct a quaternion from a 3x3 rotation matrix. More...
 
ASSIMP_API void aiDecomposeMatrix (const C_STRUCT aiMatrix4x4 *mat, C_STRUCT aiVector3D *scaling, C_STRUCT aiQuaternion *rotation, C_STRUCT aiVector3D *position)
 Decompose a transformation matrix into its rotational, translational and scaling components. More...
 
ASSIMP_API void aiDetachAllLogStreams (void)
 Detach all active log streams from the libraries' logging system. More...
 
ASSIMP_API C_ENUM aiReturn aiDetachLogStream (const C_STRUCT aiLogStream *stream)
 Detach a custom log stream from the libraries' logging system. More...
 
ASSIMP_API void aiEnableVerboseLogging (aiBool d)
 Enable verbose logging. More...
 
ASSIMP_API const char * aiGetErrorString (void)
 Returns the error text of the last failed import process. More...
 
ASSIMP_API void aiGetExtensionList (C_STRUCT aiString *szOut)
 Get a list of all file extensions supported by ASSIMP. More...
 
ASSIMP_API size_t aiGetImportFormatCount (void)
 Returns the number of import file formats available in the current Assimp build. More...
 
ASSIMP_API const C_STRUCT aiImporterDescaiGetImportFormatDescription (size_t pIndex)
 Returns a description of the nth import file format. More...
 
ASSIMP_API void aiGetMemoryRequirements (const C_STRUCT aiScene *pIn, C_STRUCT aiMemoryInfo *in)
 Get the approximated storage required by an imported asset. More...
 
ASSIMP_API C_STRUCT aiLogStream aiGetPredefinedLogStream (C_ENUM aiDefaultLogStream pStreams, const char *file)
 Get one of the predefine log streams. More...
 
ASSIMP_API void aiIdentityMatrix3 (C_STRUCT aiMatrix3x3 *mat)
 Get a 3x3 identity matrix. More...
 
ASSIMP_API void aiIdentityMatrix4 (C_STRUCT aiMatrix4x4 *mat)
 Get a 4x4 identity matrix. More...
 
ASSIMP_API const C_STRUCT aiSceneaiImportFile (const char *pFile, unsigned int pFlags)
 Reads the given file and returns its content. More...
 
ASSIMP_API const C_STRUCT aiSceneaiImportFileEx (const char *pFile, unsigned int pFlags, C_STRUCT aiFileIO *pFS)
 Reads the given file using user-defined I/O functions and returns its content. More...
 
ASSIMP_API const C_STRUCT aiSceneaiImportFileExWithProperties (const char *pFile, unsigned int pFlags, C_STRUCT aiFileIO *pFS, const C_STRUCT aiPropertyStore *pProps)
 Same as aiImportFileEx, but adds an extra parameter containing importer settings. More...
 
ASSIMP_API const C_STRUCT aiSceneaiImportFileFromMemory (const char *pBuffer, unsigned int pLength, unsigned int pFlags, const char *pHint)
 Reads the given file from a given memory buffer,. More...
 
ASSIMP_API const C_STRUCT aiSceneaiImportFileFromMemoryWithProperties (const char *pBuffer, unsigned int pLength, unsigned int pFlags, const char *pHint, const C_STRUCT aiPropertyStore *pProps)
 Same as aiImportFileFromMemory, but adds an extra parameter containing importer settings. More...
 
ASSIMP_API aiBool aiIsExtensionSupported (const char *szExtension)
 Returns whether a given file extension is supported by ASSIMP. More...
 
ASSIMP_API int aiMatrix3AreEqual (const C_STRUCT aiMatrix3x3 *a, const C_STRUCT aiMatrix3x3 *b)
 Check if 3x3 matrices are equal. More...
 
ASSIMP_API int aiMatrix3AreEqualEpsilon (const C_STRUCT aiMatrix3x3 *a, const C_STRUCT aiMatrix3x3 *b, const float epsilon)
 Check if 3x3 matrices are equal. More...
 
ASSIMP_API float aiMatrix3Determinant (const C_STRUCT aiMatrix3x3 *mat)
 Get the determinant of a 3x3 matrix. More...
 
ASSIMP_API void aiMatrix3FromMatrix4 (C_STRUCT aiMatrix3x3 *dst, const C_STRUCT aiMatrix4x4 *mat)
 Construct a 3x3 matrix from a 4x4 matrix. More...
 
ASSIMP_API void aiMatrix3FromQuaternion (C_STRUCT aiMatrix3x3 *mat, const C_STRUCT aiQuaternion *q)
 Construct a 3x3 matrix from a quaternion. More...
 
ASSIMP_API void aiMatrix3FromRotationAroundAxis (C_STRUCT aiMatrix3x3 *mat, const C_STRUCT aiVector3D *axis, const float angle)
 Returns a 3x3 rotation matrix for a rotation around an arbitrary axis. More...
 
ASSIMP_API void aiMatrix3FromTo (C_STRUCT aiMatrix3x3 *mat, const C_STRUCT aiVector3D *from, const C_STRUCT aiVector3D *to)
 Create a 3x3 matrix that rotates one vector to another vector. More...
 
ASSIMP_API void aiMatrix3Inverse (C_STRUCT aiMatrix3x3 *mat)
 Invert a 3x3 matrix. More...
 
ASSIMP_API void aiMatrix3RotationZ (C_STRUCT aiMatrix3x3 *mat, const float angle)
 Get a 3x3 rotation matrix around the Z axis. More...
 
ASSIMP_API void aiMatrix3Translation (C_STRUCT aiMatrix3x3 *mat, const C_STRUCT aiVector2D *translation)
 Get a 3x3 translation matrix. More...
 
ASSIMP_API void aiMatrix4Add (C_STRUCT aiMatrix4x4 *dst, const C_STRUCT aiMatrix4x4 *src)
 Add 4x4 matrices. More...
 
ASSIMP_API int aiMatrix4AreEqual (const C_STRUCT aiMatrix4x4 *a, const C_STRUCT aiMatrix4x4 *b)
 Check if 4x4 matrices are equal. More...
 
ASSIMP_API int aiMatrix4AreEqualEpsilon (const C_STRUCT aiMatrix4x4 *a, const C_STRUCT aiMatrix4x4 *b, const float epsilon)
 Check if 4x4 matrices are equal. More...
 
ASSIMP_API void aiMatrix4DecomposeIntoScalingAxisAnglePosition (const C_STRUCT aiMatrix4x4 *mat, C_STRUCT aiVector3D *scaling, C_STRUCT aiVector3D *axis, ai_real *angle, C_STRUCT aiVector3D *position)
 Decompose a transformation matrix into its scaling, rotational split into an axis and rotational angle, and it's translational components. More...
 
ASSIMP_API void aiMatrix4DecomposeIntoScalingEulerAnglesPosition (const C_STRUCT aiMatrix4x4 *mat, C_STRUCT aiVector3D *scaling, C_STRUCT aiVector3D *rotation, C_STRUCT aiVector3D *position)
 Decompose a transformation matrix into its scaling, rotational as euler angles, and translational components. More...
 
ASSIMP_API void aiMatrix4DecomposeNoScaling (const C_STRUCT aiMatrix4x4 *mat, C_STRUCT aiQuaternion *rotation, C_STRUCT aiVector3D *position)
 Decompose a transformation matrix into its rotational and translational components. More...
 
ASSIMP_API float aiMatrix4Determinant (const C_STRUCT aiMatrix4x4 *mat)
 Get the determinant of a 4x4 matrix. More...
 
ASSIMP_API void aiMatrix4FromEulerAngles (C_STRUCT aiMatrix4x4 *mat, float x, float y, float z)
 Creates a 4x4 matrix from a set of euler angles. More...
 
ASSIMP_API void aiMatrix4FromMatrix3 (C_STRUCT aiMatrix4x4 *dst, const C_STRUCT aiMatrix3x3 *mat)
 Construct a 4x4 matrix from a 3x3 matrix. More...
 
ASSIMP_API void aiMatrix4FromRotationAroundAxis (C_STRUCT aiMatrix4x4 *mat, const C_STRUCT aiVector3D *axis, const float angle)
 Returns a 4x4 rotation matrix for a rotation around an arbitrary axis. More...
 
ASSIMP_API void aiMatrix4FromScalingQuaternionPosition (C_STRUCT aiMatrix4x4 *mat, const C_STRUCT aiVector3D *scaling, const C_STRUCT aiQuaternion *rotation, const C_STRUCT aiVector3D *position)
 Construct a 4x4 matrix from scaling, rotation and position. More...
 
ASSIMP_API void aiMatrix4FromTo (C_STRUCT aiMatrix4x4 *mat, const C_STRUCT aiVector3D *from, const C_STRUCT aiVector3D *to)
 Create a 4x4 matrix that rotates one vector to another vector. More...
 
ASSIMP_API void aiMatrix4Inverse (C_STRUCT aiMatrix4x4 *mat)
 Invert a 4x4 matrix. More...
 
ASSIMP_API int aiMatrix4IsIdentity (const C_STRUCT aiMatrix4x4 *mat)
 Returns true of the matrix is the identity matrix. More...
 
ASSIMP_API void aiMatrix4RotationX (C_STRUCT aiMatrix4x4 *mat, const float angle)
 Get a 4x4 rotation matrix around the X axis. More...
 
ASSIMP_API void aiMatrix4RotationY (C_STRUCT aiMatrix4x4 *mat, const float angle)
 Get a 4x4 rotation matrix around the Y axis. More...
 
ASSIMP_API void aiMatrix4RotationZ (C_STRUCT aiMatrix4x4 *mat, const float angle)
 Get a 4x4 rotation matrix around the Z axis. More...
 
ASSIMP_API void aiMatrix4Scaling (C_STRUCT aiMatrix4x4 *mat, const C_STRUCT aiVector3D *scaling)
 Get a 4x4 scaling matrix. More...
 
ASSIMP_API void aiMatrix4Translation (C_STRUCT aiMatrix4x4 *mat, const C_STRUCT aiVector3D *translation)
 Get a 4x4 translation matrix. More...
 
ASSIMP_API void aiMultiplyMatrix3 (C_STRUCT aiMatrix3x3 *dst, const C_STRUCT aiMatrix3x3 *src)
 Multiply two 3x3 matrices. More...
 
ASSIMP_API void aiMultiplyMatrix4 (C_STRUCT aiMatrix4x4 *dst, const C_STRUCT aiMatrix4x4 *src)
 Multiply two 4x4 matrices. More...
 
ASSIMP_API int aiQuaternionAreEqual (const C_STRUCT aiQuaternion *a, const C_STRUCT aiQuaternion *b)
 Check if quaternions are equal. More...
 
ASSIMP_API int aiQuaternionAreEqualEpsilon (const C_STRUCT aiQuaternion *a, const C_STRUCT aiQuaternion *b, const float epsilon)
 Check if quaternions are equal using epsilon. More...
 
ASSIMP_API void aiQuaternionConjugate (C_STRUCT aiQuaternion *q)
 Compute quaternion conjugate. More...
 
ASSIMP_API void aiQuaternionFromAxisAngle (C_STRUCT aiQuaternion *q, const C_STRUCT aiVector3D *axis, const float angle)
 Create a Quaternion from an axis angle pair. More...
 
ASSIMP_API void aiQuaternionFromEulerAngles (C_STRUCT aiQuaternion *q, float x, float y, float z)
 Create a Quaternion from euler angles. More...
 
ASSIMP_API void aiQuaternionFromNormalizedQuaternion (C_STRUCT aiQuaternion *q, const C_STRUCT aiVector3D *normalized)
 Create a Quaternion from a normalized quaternion stored in a 3D vector. More...
 
ASSIMP_API void aiQuaternionInterpolate (C_STRUCT aiQuaternion *dst, const C_STRUCT aiQuaternion *start, const C_STRUCT aiQuaternion *end, const float factor)
 Performs a spherical interpolation between two quaternions. More...
 
ASSIMP_API void aiQuaternionMultiply (C_STRUCT aiQuaternion *dst, const C_STRUCT aiQuaternion *q)
 Multiply quaternions. More...
 
ASSIMP_API void aiQuaternionNormalize (C_STRUCT aiQuaternion *q)
 Normalize a quaternion. More...
 
ASSIMP_API void aiReleaseImport (const C_STRUCT aiScene *pScene)
 Releases all resources associated with the given import process. More...
 
ASSIMP_API void aiReleasePropertyStore (C_STRUCT aiPropertyStore *p)
 Delete a property store. More...
 
ASSIMP_API void aiSetImportPropertyFloat (C_STRUCT aiPropertyStore *store, const char *szName, ai_real value)
 Set a floating-point property. More...
 
ASSIMP_API void aiSetImportPropertyInteger (C_STRUCT aiPropertyStore *store, const char *szName, int value)
 Set an integer property. More...
 
ASSIMP_API void aiSetImportPropertyMatrix (C_STRUCT aiPropertyStore *store, const char *szName, const C_STRUCT aiMatrix4x4 *mat)
 Set a matrix property. More...
 
ASSIMP_API void aiSetImportPropertyString (C_STRUCT aiPropertyStore *store, const char *szName, const C_STRUCT aiString *st)
 Set a string property. More...
 
ASSIMP_API void aiTransformVecByMatrix3 (C_STRUCT aiVector3D *vec, const C_STRUCT aiMatrix3x3 *mat)
 Transform a vector by a 3x3 matrix. More...
 
ASSIMP_API void aiTransformVecByMatrix4 (C_STRUCT aiVector3D *vec, const C_STRUCT aiMatrix4x4 *mat)
 Transform a vector by a 4x4 matrix. More...
 
ASSIMP_API void aiTransposeMatrix3 (C_STRUCT aiMatrix3x3 *mat)
 Transpose a 3x3 matrix. More...
 
ASSIMP_API void aiTransposeMatrix4 (C_STRUCT aiMatrix4x4 *mat)
 Transpose a 4x4 matrix. More...
 
ASSIMP_API void aiVector2Add (C_STRUCT aiVector2D *dst, const C_STRUCT aiVector2D *src)
 Add 2D vectors. More...
 
ASSIMP_API int aiVector2AreEqual (const C_STRUCT aiVector2D *a, const C_STRUCT aiVector2D *b)
 Check if 2D vectors are equal. More...
 
ASSIMP_API int aiVector2AreEqualEpsilon (const C_STRUCT aiVector2D *a, const C_STRUCT aiVector2D *b, const float epsilon)
 Check if 2D vectors are equal using epsilon. More...
 
ASSIMP_API void aiVector2DivideByScalar (C_STRUCT aiVector2D *dst, const float s)
 Divide a 2D vector by a scalar. More...
 
ASSIMP_API void aiVector2DivideByVector (C_STRUCT aiVector2D *dst, C_STRUCT aiVector2D *v)
 Divide each component of a 2D vector by the components of another vector. More...
 
ASSIMP_API float aiVector2DotProduct (const C_STRUCT aiVector2D *a, const C_STRUCT aiVector2D *b)
 Get the dot product of 2D vectors. More...
 
ASSIMP_API float aiVector2Length (const C_STRUCT aiVector2D *v)
 Get the length of a 2D vector. More...
 
ASSIMP_API void aiVector2Negate (C_STRUCT aiVector2D *dst)
 Negate a 2D vector. More...
 
ASSIMP_API void aiVector2Normalize (C_STRUCT aiVector2D *v)
 Normalize a 2D vector. More...
 
ASSIMP_API void aiVector2Scale (C_STRUCT aiVector2D *dst, const float s)
 Multiply a 2D vector by a scalar. More...
 
ASSIMP_API float aiVector2SquareLength (const C_STRUCT aiVector2D *v)
 Get the squared length of a 2D vector. More...
 
ASSIMP_API void aiVector2Subtract (C_STRUCT aiVector2D *dst, const C_STRUCT aiVector2D *src)
 Subtract 2D vectors. More...
 
ASSIMP_API void aiVector2SymMul (C_STRUCT aiVector2D *dst, const C_STRUCT aiVector2D *other)
 Multiply each component of a 2D vector with the components of another vector. More...
 
ASSIMP_API void aiVector3Add (C_STRUCT aiVector3D *dst, const C_STRUCT aiVector3D *src)
 Add 3D vectors. More...
 
ASSIMP_API int aiVector3AreEqual (const C_STRUCT aiVector3D *a, const C_STRUCT aiVector3D *b)
 Check if 3D vectors are equal. More...
 
ASSIMP_API int aiVector3AreEqualEpsilon (const C_STRUCT aiVector3D *a, const C_STRUCT aiVector3D *b, const float epsilon)
 Check if 3D vectors are equal using epsilon. More...
 
ASSIMP_API void aiVector3CrossProduct (C_STRUCT aiVector3D *dst, const C_STRUCT aiVector3D *a, const C_STRUCT aiVector3D *b)
 Get cross product of 3D vectors. More...
 
ASSIMP_API void aiVector3DivideByScalar (C_STRUCT aiVector3D *dst, const float s)
 Divide a 3D vector by a scalar. More...
 
ASSIMP_API void aiVector3DivideByVector (C_STRUCT aiVector3D *dst, C_STRUCT aiVector3D *v)
 Divide each component of a 3D vector by the components of another vector. More...
 
ASSIMP_API float aiVector3DotProduct (const C_STRUCT aiVector3D *a, const C_STRUCT aiVector3D *b)
 Get the dot product of 3D vectors. More...
 
ASSIMP_API float aiVector3Length (const C_STRUCT aiVector3D *v)
 Get the length of a 3D vector. More...
 
ASSIMP_API int aiVector3LessThan (const C_STRUCT aiVector3D *a, const C_STRUCT aiVector3D *b)
 Check if vector a is less than vector b. More...
 
ASSIMP_API void aiVector3Negate (C_STRUCT aiVector3D *dst)
 Negate a 3D vector. More...
 
ASSIMP_API void aiVector3Normalize (C_STRUCT aiVector3D *v)
 Normalize a 3D vector. More...
 
ASSIMP_API void aiVector3NormalizeSafe (C_STRUCT aiVector3D *v)
 Check for division by zero and normalize a 3D vector. More...
 
ASSIMP_API void aiVector3RotateByQuaternion (C_STRUCT aiVector3D *v, const C_STRUCT aiQuaternion *q)
 Rotate a 3D vector by a quaternion. More...
 
ASSIMP_API void aiVector3Scale (C_STRUCT aiVector3D *dst, const float s)
 Multiply a 3D vector by a scalar. More...
 
ASSIMP_API float aiVector3SquareLength (const C_STRUCT aiVector3D *v)
 Get the squared length of a 3D vector. More...
 
ASSIMP_API void aiVector3Subtract (C_STRUCT aiVector3D *dst, const C_STRUCT aiVector3D *src)
 Subtract 3D vectors. More...
 
ASSIMP_API void aiVector3SymMul (C_STRUCT aiVector3D *dst, const C_STRUCT aiVector3D *other)
 Multiply each component of a 3D vector with the components of another vector. More...
 

Detailed Description

Defines the C-API to the Open Asset Import Library.

Macro Definition Documentation

◆ AI_ASSIMP_H_INC

#define AI_ASSIMP_H_INC

◆ AI_FALSE

#define AI_FALSE   0

◆ AI_TRUE

#define AI_TRUE   1

Typedef Documentation

◆ aiBool

typedef int aiBool

Our own C boolean type.

◆ aiLogStreamCallback

typedef void(* aiLogStreamCallback) (const char *, char *)

Function Documentation

◆ aiApplyPostProcessing()

ASSIMP_API const C_STRUCT aiScene * aiApplyPostProcessing ( const C_STRUCT aiScene pScene,
unsigned int  pFlags 
)

Apply post-processing to an already-imported scene.

This is strictly equivalent to calling aiImportFile()/aiImportFileEx with the same flags. However, you can use this separate function to inspect the imported scene first to fine-tune your post-processing setup.

Parameters
pSceneScene to work on.
pFlagsProvide a bitwise combination of the aiPostProcessSteps flags.
Returns
A pointer to the post-processed data. Post processing is done in-place, meaning this is still the same aiScene which you passed for pScene. However, if post-processing failed, the scene could now be NULL. That's quite a rare case, post processing steps are not really designed to 'fail'. To be exact, the aiProcess_ValidateDataStructure flag is currently the only post processing step which can actually cause the scene to be reset to NULL.

◆ aiAttachLogStream()

ASSIMP_API void aiAttachLogStream ( const C_STRUCT aiLogStream stream)

Attach a custom log stream to the libraries' logging system.

Attaching a log stream can slightly reduce Assimp's overall import performance. Multiple log-streams can be attached.

Parameters
streamDescribes the new log stream.
Note
To ensure proper destruction of the logging system, you need to manually call aiDetachLogStream() on every single log stream you attach. Alternatively (for the lazy folks) aiDetachAllLogStreams is provided.

◆ aiCreatePropertyStore()

ASSIMP_API C_STRUCT aiPropertyStore * aiCreatePropertyStore ( void  )

Create an empty property store.

Property stores are used to collect import settings.

Returns
New property store. Property stores need to be manually destroyed using the aiReleasePropertyStore API function.

◆ aiCreateQuaternionFromMatrix()

ASSIMP_API void aiCreateQuaternionFromMatrix ( C_STRUCT aiQuaternion quat,
const C_STRUCT aiMatrix3x3 mat 
)

Construct a quaternion from a 3x3 rotation matrix.

Parameters
quatReceives the output quaternion.
matMatrix to 'quaternionize'.
See also
aiQuaternion(const aiMatrix3x3& pRotMatrix)

◆ aiDecomposeMatrix()

ASSIMP_API void aiDecomposeMatrix ( const C_STRUCT aiMatrix4x4 mat,
C_STRUCT aiVector3D scaling,
C_STRUCT aiQuaternion rotation,
C_STRUCT aiVector3D position 
)

Decompose a transformation matrix into its rotational, translational and scaling components.

Parameters
matMatrix to decompose
scalingReceives the scaling component
rotationReceives the rotational component
positionReceives the translational component.
See also
aiMatrix4x4::Decompose (aiVector3D&, aiQuaternion&, aiVector3D&) const;

◆ aiDetachAllLogStreams()

ASSIMP_API void aiDetachAllLogStreams ( void  )

Detach all active log streams from the libraries' logging system.

This ensures that the logging system is terminated properly and all resources allocated by it are actually freed. If you attached a stream, don't forget to detach it again.

See also
aiAttachLogStream
aiDetachLogStream

◆ aiDetachLogStream()

ASSIMP_API C_ENUM aiReturn aiDetachLogStream ( const C_STRUCT aiLogStream stream)

Detach a custom log stream from the libraries' logging system.

This is the counterpart of aiAttachLogStream. If you attached a stream, don't forget to detach it again.

Parameters
streamThe log stream to be detached.
Returns
AI_SUCCESS if the log stream has been detached successfully.
See also
aiDetachAllLogStreams

◆ aiEnableVerboseLogging()

ASSIMP_API void aiEnableVerboseLogging ( aiBool  d)

Enable verbose logging.

Verbose logging includes debug-related stuff and detailed import statistics. This can have severe impact on import performance and memory consumption. However, it might be useful to find out why a file didn't read correctly.

Parameters
dAI_TRUE or AI_FALSE, your decision.

◆ aiGetErrorString()

ASSIMP_API const char * aiGetErrorString ( void  )

Returns the error text of the last failed import process.

Returns
A textual description of the error that occurred at the last import process. NULL if there was no error. There can't be an error if you got a non-NULL aiScene from aiImportFile/aiImportFileEx/aiApplyPostProcessing.

◆ aiGetExtensionList()

ASSIMP_API void aiGetExtensionList ( C_STRUCT aiString szOut)

Get a list of all file extensions supported by ASSIMP.

If a file extension is contained in the list this does, of course, not mean that ASSIMP is able to load all files with this extension.

Parameters
szOutString to receive the extension list. Format of the list: "*.3ds;*.obj;*.dae". NULL is not a valid parameter.

◆ aiGetImportFormatCount()

ASSIMP_API size_t aiGetImportFormatCount ( void  )

Returns the number of import file formats available in the current Assimp build.

Use aiGetImportFormatDescription() to retrieve infos of a specific import format.

◆ aiGetImportFormatDescription()

ASSIMP_API const C_STRUCT aiImporterDesc * aiGetImportFormatDescription ( size_t  pIndex)

Returns a description of the nth import file format.

Use aiGetImportFormatCount() to learn how many import formats are supported.

Parameters
pIndexIndex of the import format to retrieve information for. Valid range is 0 to aiGetImportFormatCount()
Returns
A description of that specific import format. NULL if pIndex is out of range.

◆ aiGetMemoryRequirements()

ASSIMP_API void aiGetMemoryRequirements ( const C_STRUCT aiScene pIn,
C_STRUCT aiMemoryInfo in 
)

Get the approximated storage required by an imported asset.

Parameters
pInInput asset.
inData structure to be filled.

◆ aiGetPredefinedLogStream()

ASSIMP_API C_STRUCT aiLogStream aiGetPredefinedLogStream ( C_ENUM aiDefaultLogStream  pStreams,
const char *  file 
)

Get one of the predefine log streams.

This is the quick'n'easy solution to access Assimp's log system. Attaching a log stream can slightly reduce Assimp's overall import performance.

Usage is rather simple (this will stream the log to a file, named log.txt, and the stdout stream of the process:

struct aiLogStream c;
ASSIMP_API void aiAttachLogStream(const C_STRUCT aiLogStream *stream)
Attach a custom log stream to the libraries' logging system.
ASSIMP_API C_STRUCT aiLogStream aiGetPredefinedLogStream(C_ENUM aiDefaultLogStream pStreams, const char *file)
Get one of the predefine log streams.
C-API: Represents a log stream.
Definition: cimport.h:72
@ aiDefaultLogStream_STDOUT
Stream the log to std::cout.
Definition: types.h:457
@ aiDefaultLogStream_FILE
Stream the log to a file.
Definition: types.h:454
Parameters
pStreamsOne of the aiDefaultLogStream enumerated values.
fileSolely for the aiDefaultLogStream_FILE flag: specifies the file to write to. Pass NULL for all other flags.
Returns
The log stream. callback is set to NULL if something went wrong.

◆ aiIdentityMatrix3()

ASSIMP_API void aiIdentityMatrix3 ( C_STRUCT aiMatrix3x3 mat)

Get a 3x3 identity matrix.

Parameters
matMatrix to receive its personal identity

◆ aiIdentityMatrix4()

ASSIMP_API void aiIdentityMatrix4 ( C_STRUCT aiMatrix4x4 mat)

Get a 4x4 identity matrix.

Parameters
matMatrix to receive its personal identity

◆ aiImportFile()

ASSIMP_API const C_STRUCT aiScene * aiImportFile ( const char *  pFile,
unsigned int  pFlags 
)

Reads the given file and returns its content.

If the call succeeds, the imported data is returned in an aiScene structure. The data is intended to be read-only, it stays property of the ASSIMP library and will be stable until aiReleaseImport() is called. After you're done with it, call aiReleaseImport() to free the resources associated with this file. If the import fails, NULL is returned instead. Call aiGetErrorString() to retrieve a human-readable error text.

Parameters
pFilePath and filename of the file to be imported, expected to be a null-terminated c-string. NULL is not a valid value.
pFlagsOptional post processing steps to be executed after a successful import. Provide a bitwise combination of the aiPostProcessSteps flags.
Returns
Pointer to the imported data or NULL if the import failed.

◆ aiImportFileEx()

ASSIMP_API const C_STRUCT aiScene * aiImportFileEx ( const char *  pFile,
unsigned int  pFlags,
C_STRUCT aiFileIO pFS 
)

Reads the given file using user-defined I/O functions and returns its content.

If the call succeeds, the imported data is returned in an aiScene structure. The data is intended to be read-only, it stays property of the ASSIMP library and will be stable until aiReleaseImport() is called. After you're done with it, call aiReleaseImport() to free the resources associated with this file. If the import fails, NULL is returned instead. Call aiGetErrorString() to retrieve a human-readable error text.

Parameters
pFilePath and filename of the file to be imported, expected to be a null-terminated c-string. NULL is not a valid value.
pFlagsOptional post processing steps to be executed after a successful import. Provide a bitwise combination of the aiPostProcessSteps flags.
pFSaiFileIO structure. Will be used to open the model file itself and any other files the loader needs to open. Pass NULL to use the default implementation.
Returns
Pointer to the imported data or NULL if the import failed.
Note
Include <aiFileIO.h> for the definition of aiFileIO.

◆ aiImportFileExWithProperties()

ASSIMP_API const C_STRUCT aiScene * aiImportFileExWithProperties ( const char *  pFile,
unsigned int  pFlags,
C_STRUCT aiFileIO pFS,
const C_STRUCT aiPropertyStore pProps 
)

Same as aiImportFileEx, but adds an extra parameter containing importer settings.

Parameters
pFilePath and filename of the file to be imported, expected to be a null-terminated c-string. NULL is not a valid value.
pFlagsOptional post processing steps to be executed after a successful import. Provide a bitwise combination of the aiPostProcessSteps flags.
pFSaiFileIO structure. Will be used to open the model file itself and any other files the loader needs to open. Pass NULL to use the default implementation.
pPropsaiPropertyStore instance containing import settings.
Returns
Pointer to the imported data or NULL if the import failed.
Note
Include <aiFileIO.h> for the definition of aiFileIO.
See also
aiImportFileEx

◆ aiImportFileFromMemory()

ASSIMP_API const C_STRUCT aiScene * aiImportFileFromMemory ( const char *  pBuffer,
unsigned int  pLength,
unsigned int  pFlags,
const char *  pHint 
)

Reads the given file from a given memory buffer,.

If the call succeeds, the contents of the file are returned as a pointer to an aiScene object. The returned data is intended to be read-only, the importer keeps ownership of the data and will destroy it upon destruction. If the import fails, NULL is returned. A human-readable error description can be retrieved by calling aiGetErrorString().

Parameters
pBufferPointer to the file data
pLengthLength of pBuffer, in bytes
pFlagsOptional post processing steps to be executed after a successful import. Provide a bitwise combination of the aiPostProcessSteps flags. If you wish to inspect the imported scene first in order to fine-tune your post-processing setup, consider to use aiApplyPostProcessing().
pHintAn additional hint to the library. If this is a non empty string, the library looks for a loader to support the file extension specified by pHint and passes the file to the first matching loader. If this loader is unable to completely the request, the library continues and tries to determine the file format on its own, a task that may or may not be successful. Check the return value, and you'll know ...
Returns
A pointer to the imported data, NULL if the import failed.
Note
This is a straightforward way to decode models from memory buffers, but it doesn't handle model formats that spread their data across multiple files or even directories. Examples include OBJ or MD3, which outsource parts of their material info into external scripts. If you need full functionality, provide a custom IOSystem to make Assimp find these files and use the regular aiImportFileEx()/aiImportFileExWithProperties() API.

◆ aiImportFileFromMemoryWithProperties()

ASSIMP_API const C_STRUCT aiScene * aiImportFileFromMemoryWithProperties ( const char *  pBuffer,
unsigned int  pLength,
unsigned int  pFlags,
const char *  pHint,
const C_STRUCT aiPropertyStore pProps 
)

Same as aiImportFileFromMemory, but adds an extra parameter containing importer settings.

Parameters
pBufferPointer to the file data
pLengthLength of pBuffer, in bytes
pFlagsOptional post processing steps to be executed after a successful import. Provide a bitwise combination of the aiPostProcessSteps flags. If you wish to inspect the imported scene first in order to fine-tune your post-processing setup, consider to use aiApplyPostProcessing().
pHintAn additional hint to the library. If this is a non empty string, the library looks for a loader to support the file extension specified by pHint and passes the file to the first matching loader. If this loader is unable to completely the request, the library continues and tries to determine the file format on its own, a task that may or may not be successful. Check the return value, and you'll know ...
pPropsaiPropertyStore instance containing import settings.
Returns
A pointer to the imported data, NULL if the import failed.
Note
This is a straightforward way to decode models from memory buffers, but it doesn't handle model formats that spread their data across multiple files or even directories. Examples include OBJ or MD3, which outsource parts of their material info into external scripts. If you need full functionality, provide a custom IOSystem to make Assimp find these files and use the regular aiImportFileEx()/aiImportFileExWithProperties() API.
See also
aiImportFileFromMemory

◆ aiIsExtensionSupported()

ASSIMP_API aiBool aiIsExtensionSupported ( const char *  szExtension)

Returns whether a given file extension is supported by ASSIMP.

Parameters
szExtensionExtension for which the function queries support for. Must include a leading dot '.'. Example: ".3ds", ".md3"
Returns
AI_TRUE if the file extension is supported.

◆ aiMatrix3AreEqual()

ASSIMP_API int aiMatrix3AreEqual ( const C_STRUCT aiMatrix3x3 a,
const C_STRUCT aiMatrix3x3 b 
)

Check if 3x3 matrices are equal.

Parameters
aFirst matrix to compare
bSecond matrix to compare
Returns
1 if the matrices are equal
0 if the matrices are not equal

◆ aiMatrix3AreEqualEpsilon()

ASSIMP_API int aiMatrix3AreEqualEpsilon ( const C_STRUCT aiMatrix3x3 a,
const C_STRUCT aiMatrix3x3 b,
const float  epsilon 
)

Check if 3x3 matrices are equal.

Parameters
aFirst matrix to compare
bSecond matrix to compare
epsilonEpsilon
Returns
1 if the matrices are equal
0 if the matrices are not equal

◆ aiMatrix3Determinant()

ASSIMP_API float aiMatrix3Determinant ( const C_STRUCT aiMatrix3x3 mat)

Get the determinant of a 3x3 matrix.

Parameters
matMatrix to get the determinant from

◆ aiMatrix3FromMatrix4()

ASSIMP_API void aiMatrix3FromMatrix4 ( C_STRUCT aiMatrix3x3 dst,
const C_STRUCT aiMatrix4x4 mat 
)

Construct a 3x3 matrix from a 4x4 matrix.

Parameters
dstReceives the output matrix
matThe 4x4 matrix to use

◆ aiMatrix3FromQuaternion()

ASSIMP_API void aiMatrix3FromQuaternion ( C_STRUCT aiMatrix3x3 mat,
const C_STRUCT aiQuaternion q 
)

Construct a 3x3 matrix from a quaternion.

Parameters
matReceives the output matrix
qThe quaternion matrix to use

◆ aiMatrix3FromRotationAroundAxis()

ASSIMP_API void aiMatrix3FromRotationAroundAxis ( C_STRUCT aiMatrix3x3 mat,
const C_STRUCT aiVector3D axis,
const float  angle 
)

Returns a 3x3 rotation matrix for a rotation around an arbitrary axis.

Parameters
matReceives the output matrix
axisRotation axis, should be a normalized vector
angleRotation angle, in radians

◆ aiMatrix3FromTo()

ASSIMP_API void aiMatrix3FromTo ( C_STRUCT aiMatrix3x3 mat,
const C_STRUCT aiVector3D from,
const C_STRUCT aiVector3D to 
)

Create a 3x3 matrix that rotates one vector to another vector.

Parameters
matReceives the output matrix
fromVector to rotate from
toVector to rotate to

◆ aiMatrix3Inverse()

ASSIMP_API void aiMatrix3Inverse ( C_STRUCT aiMatrix3x3 mat)

Invert a 3x3 matrix.

Parameters
matMatrix to invert

◆ aiMatrix3RotationZ()

ASSIMP_API void aiMatrix3RotationZ ( C_STRUCT aiMatrix3x3 mat,
const float  angle 
)

Get a 3x3 rotation matrix around the Z axis.

Parameters
matReceives the output matrix
angleRotation angle, in radians

◆ aiMatrix3Translation()

ASSIMP_API void aiMatrix3Translation ( C_STRUCT aiMatrix3x3 mat,
const C_STRUCT aiVector2D translation 
)

Get a 3x3 translation matrix.

Parameters
matReceives the output matrix
translationThe translation vector

◆ aiMatrix4Add()

ASSIMP_API void aiMatrix4Add ( C_STRUCT aiMatrix4x4 dst,
const C_STRUCT aiMatrix4x4 src 
)

Add 4x4 matrices.

Parameters
dstFirst addend, receives result.
srcMatrix to be added to 'dst'.

◆ aiMatrix4AreEqual()

ASSIMP_API int aiMatrix4AreEqual ( const C_STRUCT aiMatrix4x4 a,
const C_STRUCT aiMatrix4x4 b 
)

Check if 4x4 matrices are equal.

Parameters
aFirst matrix to compare
bSecond matrix to compare
Returns
1 if the matrices are equal
0 if the matrices are not equal

◆ aiMatrix4AreEqualEpsilon()

ASSIMP_API int aiMatrix4AreEqualEpsilon ( const C_STRUCT aiMatrix4x4 a,
const C_STRUCT aiMatrix4x4 b,
const float  epsilon 
)

Check if 4x4 matrices are equal.

Parameters
aFirst matrix to compare
bSecond matrix to compare
epsilonEpsilon
Returns
1 if the matrices are equal
0 if the matrices are not equal

◆ aiMatrix4DecomposeIntoScalingAxisAnglePosition()

ASSIMP_API void aiMatrix4DecomposeIntoScalingAxisAnglePosition ( const C_STRUCT aiMatrix4x4 mat,
C_STRUCT aiVector3D scaling,
C_STRUCT aiVector3D axis,
ai_real angle,
C_STRUCT aiVector3D position 
)

Decompose a transformation matrix into its scaling, rotational split into an axis and rotational angle, and it's translational components.

Parameters
matMatrix to decompose
rotationReceives the rotational component
axisReceives the output rotation axis
angleReceives the output rotation angle
positionReceives the output position for the x,y,z axes.

◆ aiMatrix4DecomposeIntoScalingEulerAnglesPosition()

ASSIMP_API void aiMatrix4DecomposeIntoScalingEulerAnglesPosition ( const C_STRUCT aiMatrix4x4 mat,
C_STRUCT aiVector3D scaling,
C_STRUCT aiVector3D rotation,
C_STRUCT aiVector3D position 
)

Decompose a transformation matrix into its scaling, rotational as euler angles, and translational components.

Parameters
matMatrix to decompose
scalingReceives the output scaling for the x,y,z axes
rotationReceives the output rotation as a Euler angles
positionReceives the output position for the x,y,z axes

◆ aiMatrix4DecomposeNoScaling()

ASSIMP_API void aiMatrix4DecomposeNoScaling ( const C_STRUCT aiMatrix4x4 mat,
C_STRUCT aiQuaternion rotation,
C_STRUCT aiVector3D position 
)

Decompose a transformation matrix into its rotational and translational components.

Parameters
matMatrix to decompose
rotationReceives the rotational component
positionReceives the translational component.

◆ aiMatrix4Determinant()

ASSIMP_API float aiMatrix4Determinant ( const C_STRUCT aiMatrix4x4 mat)

Get the determinant of a 4x4 matrix.

Parameters
matMatrix to get the determinant from
Returns
The determinant of the matrix

◆ aiMatrix4FromEulerAngles()

ASSIMP_API void aiMatrix4FromEulerAngles ( C_STRUCT aiMatrix4x4 mat,
float  x,
float  y,
float  z 
)

Creates a 4x4 matrix from a set of euler angles.

Parameters
matReceives the output matrix
xRotation angle for the x-axis, in radians
yRotation angle for the y-axis, in radians
zRotation angle for the z-axis, in radians

◆ aiMatrix4FromMatrix3()

ASSIMP_API void aiMatrix4FromMatrix3 ( C_STRUCT aiMatrix4x4 dst,
const C_STRUCT aiMatrix3x3 mat 
)

Construct a 4x4 matrix from a 3x3 matrix.

Parameters
dstReceives the output matrix
matThe 3x3 matrix to use

◆ aiMatrix4FromRotationAroundAxis()

ASSIMP_API void aiMatrix4FromRotationAroundAxis ( C_STRUCT aiMatrix4x4 mat,
const C_STRUCT aiVector3D axis,
const float  angle 
)

Returns a 4x4 rotation matrix for a rotation around an arbitrary axis.

Parameters
matReceives the output matrix
axisRotation axis, should be a normalized vector
angleRotation angle, in radians

◆ aiMatrix4FromScalingQuaternionPosition()

ASSIMP_API void aiMatrix4FromScalingQuaternionPosition ( C_STRUCT aiMatrix4x4 mat,
const C_STRUCT aiVector3D scaling,
const C_STRUCT aiQuaternion rotation,
const C_STRUCT aiVector3D position 
)

Construct a 4x4 matrix from scaling, rotation and position.

Parameters
matReceives the output matrix.
scalingThe scaling for the x,y,z axes
rotationThe rotation as a hamilton quaternion
positionThe position for the x,y,z axes

◆ aiMatrix4FromTo()

ASSIMP_API void aiMatrix4FromTo ( C_STRUCT aiMatrix4x4 mat,
const C_STRUCT aiVector3D from,
const C_STRUCT aiVector3D to 
)

Create a 4x4 matrix that rotates one vector to another vector.

Parameters
matReceives the output matrix
fromVector to rotate from
toVector to rotate to

◆ aiMatrix4Inverse()

ASSIMP_API void aiMatrix4Inverse ( C_STRUCT aiMatrix4x4 mat)

Invert a 4x4 matrix.

Parameters
resultMatrix to invert

◆ aiMatrix4IsIdentity()

ASSIMP_API int aiMatrix4IsIdentity ( const C_STRUCT aiMatrix4x4 mat)

Returns true of the matrix is the identity matrix.

Parameters
matMatrix to get the determinant from
Returns
1 if mat is an identity matrix.
0 if mat is not an identity matrix.

◆ aiMatrix4RotationX()

ASSIMP_API void aiMatrix4RotationX ( C_STRUCT aiMatrix4x4 mat,
const float  angle 
)

Get a 4x4 rotation matrix around the X axis.

Parameters
matReceives the output matrix
angleRotation angle, in radians

◆ aiMatrix4RotationY()

ASSIMP_API void aiMatrix4RotationY ( C_STRUCT aiMatrix4x4 mat,
const float  angle 
)

Get a 4x4 rotation matrix around the Y axis.

Parameters
matReceives the output matrix
angleRotation angle, in radians

◆ aiMatrix4RotationZ()

ASSIMP_API void aiMatrix4RotationZ ( C_STRUCT aiMatrix4x4 mat,
const float  angle 
)

Get a 4x4 rotation matrix around the Z axis.

Parameters
matReceives the output matrix
angleRotation angle, in radians

◆ aiMatrix4Scaling()

ASSIMP_API void aiMatrix4Scaling ( C_STRUCT aiMatrix4x4 mat,
const C_STRUCT aiVector3D scaling 
)

Get a 4x4 scaling matrix.

Parameters
matReceives the output matrix
scalingThe scaling vector

◆ aiMatrix4Translation()

ASSIMP_API void aiMatrix4Translation ( C_STRUCT aiMatrix4x4 mat,
const C_STRUCT aiVector3D translation 
)

Get a 4x4 translation matrix.

Parameters
matReceives the output matrix
translationThe translation vector

◆ aiMultiplyMatrix3()

ASSIMP_API void aiMultiplyMatrix3 ( C_STRUCT aiMatrix3x3 dst,
const C_STRUCT aiMatrix3x3 src 
)

Multiply two 3x3 matrices.

Parameters
dstFirst factor, receives result.
srcMatrix to be multiplied with 'dst'.

◆ aiMultiplyMatrix4()

ASSIMP_API void aiMultiplyMatrix4 ( C_STRUCT aiMatrix4x4 dst,
const C_STRUCT aiMatrix4x4 src 
)

Multiply two 4x4 matrices.

Parameters
dstFirst factor, receives result.
srcMatrix to be multiplied with 'dst'.

◆ aiQuaternionAreEqual()

ASSIMP_API int aiQuaternionAreEqual ( const C_STRUCT aiQuaternion a,
const C_STRUCT aiQuaternion b 
)

Check if quaternions are equal.

Parameters
aFirst quaternion to compare
bSecond quaternion to compare
Returns
1 if the quaternions are equal
0 if the quaternions are not equal

◆ aiQuaternionAreEqualEpsilon()

ASSIMP_API int aiQuaternionAreEqualEpsilon ( const C_STRUCT aiQuaternion a,
const C_STRUCT aiQuaternion b,
const float  epsilon 
)

Check if quaternions are equal using epsilon.

Parameters
aFirst quaternion to compare
bSecond quaternion to compare
epsilonEpsilon
Returns
1 if the quaternions are equal
0 if the quaternions are not equal

◆ aiQuaternionConjugate()

ASSIMP_API void aiQuaternionConjugate ( C_STRUCT aiQuaternion q)

Compute quaternion conjugate.

Parameters
qQuaternion to compute conjugate, receives the output quaternion

◆ aiQuaternionFromAxisAngle()

ASSIMP_API void aiQuaternionFromAxisAngle ( C_STRUCT aiQuaternion q,
const C_STRUCT aiVector3D axis,
const float  angle 
)

Create a Quaternion from an axis angle pair.

Parameters
qReceives the output quaternion
axisThe orientation axis
angleThe rotation angle, in radians

◆ aiQuaternionFromEulerAngles()

ASSIMP_API void aiQuaternionFromEulerAngles ( C_STRUCT aiQuaternion q,
float  x,
float  y,
float  z 
)

Create a Quaternion from euler angles.

Parameters
qReceives the output quaternion
xRotation angle for the x-axis, in radians
yRotation angle for the y-axis, in radians
zRotation angle for the z-axis, in radians

◆ aiQuaternionFromNormalizedQuaternion()

ASSIMP_API void aiQuaternionFromNormalizedQuaternion ( C_STRUCT aiQuaternion q,
const C_STRUCT aiVector3D normalized 
)

Create a Quaternion from a normalized quaternion stored in a 3D vector.

Parameters
qReceives the output quaternion
normalizedThe vector that stores the quaternion

◆ aiQuaternionInterpolate()

ASSIMP_API void aiQuaternionInterpolate ( C_STRUCT aiQuaternion dst,
const C_STRUCT aiQuaternion start,
const C_STRUCT aiQuaternion end,
const float  factor 
)

Performs a spherical interpolation between two quaternions.

Parameters
dstReceives the quaternion resulting from the interpolation.
startQuaternion when factor == 0
endQuaternion when factor == 1
factorInterpolation factor between 0 and 1

◆ aiQuaternionMultiply()

ASSIMP_API void aiQuaternionMultiply ( C_STRUCT aiQuaternion dst,
const C_STRUCT aiQuaternion q 
)

Multiply quaternions.

Parameters
dstFirst quaternion, receives the output quaternion
qSecond quaternion

◆ aiQuaternionNormalize()

ASSIMP_API void aiQuaternionNormalize ( C_STRUCT aiQuaternion q)

Normalize a quaternion.

Parameters
qQuaternion to normalize

◆ aiReleaseImport()

ASSIMP_API void aiReleaseImport ( const C_STRUCT aiScene pScene)

Releases all resources associated with the given import process.

Call this function after you're done with the imported data.

Parameters
pSceneThe imported data to release. NULL is a valid value.

◆ aiReleasePropertyStore()

ASSIMP_API void aiReleasePropertyStore ( C_STRUCT aiPropertyStore p)

Delete a property store.

Parameters
pProperty store to be deleted.

◆ aiSetImportPropertyFloat()

ASSIMP_API void aiSetImportPropertyFloat ( C_STRUCT aiPropertyStore store,
const char *  szName,
ai_real  value 
)

Set a floating-point property.

This is the C-version of Assimp::Importer::SetPropertyFloat(). In the C interface, properties are always shared by all imports. It is not possible to specify them per import.

Parameters
storeStore to modify. Use aiCreatePropertyStore to obtain a store.
szNameName of the configuration property to be set. All supported public properties are defined in the config.h header file (AI_CONFIG_XXX).
valueNew value for the property

◆ aiSetImportPropertyInteger()

ASSIMP_API void aiSetImportPropertyInteger ( C_STRUCT aiPropertyStore store,
const char *  szName,
int  value 
)

Set an integer property.

This is the C-version of Assimp::Importer::SetPropertyInteger(). In the C interface, properties are always shared by all imports. It is not possible to specify them per import.

Parameters
storeStore to modify. Use aiCreatePropertyStore to obtain a store.
szNameName of the configuration property to be set. All supported public properties are defined in the config.h header file (AI_CONFIG_XXX).
valueNew value for the property

◆ aiSetImportPropertyMatrix()

ASSIMP_API void aiSetImportPropertyMatrix ( C_STRUCT aiPropertyStore store,
const char *  szName,
const C_STRUCT aiMatrix4x4 mat 
)

Set a matrix property.

This is the C-version of Assimp::Importer::SetPropertyMatrix(). In the C interface, properties are always shared by all imports. It is not possible to specify them per import.

Parameters
storeStore to modify. Use aiCreatePropertyStore to obtain a store.
szNameName of the configuration property to be set. All supported public properties are defined in the config.h header file (AI_CONFIG_XXX).
matNew value for the property

◆ aiSetImportPropertyString()

ASSIMP_API void aiSetImportPropertyString ( C_STRUCT aiPropertyStore store,
const char *  szName,
const C_STRUCT aiString st 
)

Set a string property.

This is the C-version of Assimp::Importer::SetPropertyString(). In the C interface, properties are always shared by all imports. It is not possible to specify them per import.

Parameters
storeStore to modify. Use aiCreatePropertyStore to obtain a store.
szNameName of the configuration property to be set. All supported public properties are defined in the config.h header file (AI_CONFIG_XXX).
stNew value for the property

◆ aiTransformVecByMatrix3()

ASSIMP_API void aiTransformVecByMatrix3 ( C_STRUCT aiVector3D vec,
const C_STRUCT aiMatrix3x3 mat 
)

Transform a vector by a 3x3 matrix.

Parameters
vecVector to be transformed.
matMatrix to transform the vector with.

◆ aiTransformVecByMatrix4()

ASSIMP_API void aiTransformVecByMatrix4 ( C_STRUCT aiVector3D vec,
const C_STRUCT aiMatrix4x4 mat 
)

Transform a vector by a 4x4 matrix.

Parameters
vecVector to be transformed.
matMatrix to transform the vector with.

◆ aiTransposeMatrix3()

ASSIMP_API void aiTransposeMatrix3 ( C_STRUCT aiMatrix3x3 mat)

Transpose a 3x3 matrix.

Parameters
matPointer to the matrix to be transposed

◆ aiTransposeMatrix4()

ASSIMP_API void aiTransposeMatrix4 ( C_STRUCT aiMatrix4x4 mat)

Transpose a 4x4 matrix.

Parameters
matPointer to the matrix to be transposed

◆ aiVector2Add()

ASSIMP_API void aiVector2Add ( C_STRUCT aiVector2D dst,
const C_STRUCT aiVector2D src 
)

Add 2D vectors.

Parameters
dstFirst addend, receives result.
srcVector to be added to 'dst'.

◆ aiVector2AreEqual()

ASSIMP_API int aiVector2AreEqual ( const C_STRUCT aiVector2D a,
const C_STRUCT aiVector2D b 
)

Check if 2D vectors are equal.

Parameters
aFirst vector to compare
bSecond vector to compare
Returns
1 if the vectors are equal
0 if the vectors are not equal

◆ aiVector2AreEqualEpsilon()

ASSIMP_API int aiVector2AreEqualEpsilon ( const C_STRUCT aiVector2D a,
const C_STRUCT aiVector2D b,
const float  epsilon 
)

Check if 2D vectors are equal using epsilon.

Parameters
aFirst vector to compare
bSecond vector to compare
epsilonEpsilon
Returns
1 if the vectors are equal
0 if the vectors are not equal

◆ aiVector2DivideByScalar()

ASSIMP_API void aiVector2DivideByScalar ( C_STRUCT aiVector2D dst,
const float  s 
)

Divide a 2D vector by a scalar.

Parameters
dstVector to be divided by s
sScalar divisor

◆ aiVector2DivideByVector()

ASSIMP_API void aiVector2DivideByVector ( C_STRUCT aiVector2D dst,
C_STRUCT aiVector2D v 
)

Divide each component of a 2D vector by the components of another vector.

Parameters
dstVector as the dividend
vVector as the divisor

◆ aiVector2DotProduct()

ASSIMP_API float aiVector2DotProduct ( const C_STRUCT aiVector2D a,
const C_STRUCT aiVector2D b 
)

Get the dot product of 2D vectors.

Parameters
aFirst vector
bSecond vector
Returns
The dot product of vectors

◆ aiVector2Length()

ASSIMP_API float aiVector2Length ( const C_STRUCT aiVector2D v)

Get the length of a 2D vector.

Returns
v Vector to evaluate

◆ aiVector2Negate()

ASSIMP_API void aiVector2Negate ( C_STRUCT aiVector2D dst)

Negate a 2D vector.

Parameters
dstVector to be negated

◆ aiVector2Normalize()

ASSIMP_API void aiVector2Normalize ( C_STRUCT aiVector2D v)

Normalize a 2D vector.

Parameters
vVector to normalize

◆ aiVector2Scale()

ASSIMP_API void aiVector2Scale ( C_STRUCT aiVector2D dst,
const float  s 
)

Multiply a 2D vector by a scalar.

Parameters
dstVector to be scaled by s
sScale factor

◆ aiVector2SquareLength()

ASSIMP_API float aiVector2SquareLength ( const C_STRUCT aiVector2D v)

Get the squared length of a 2D vector.

Returns
v Vector to evaluate

◆ aiVector2Subtract()

ASSIMP_API void aiVector2Subtract ( C_STRUCT aiVector2D dst,
const C_STRUCT aiVector2D src 
)

Subtract 2D vectors.

Parameters
dstMinuend, receives result.
srcVector to be subtracted from 'dst'.

◆ aiVector2SymMul()

ASSIMP_API void aiVector2SymMul ( C_STRUCT aiVector2D dst,
const C_STRUCT aiVector2D other 
)

Multiply each component of a 2D vector with the components of another vector.

Parameters
dstFirst vector, receives result
otherSecond vector

◆ aiVector3Add()

ASSIMP_API void aiVector3Add ( C_STRUCT aiVector3D dst,
const C_STRUCT aiVector3D src 
)

Add 3D vectors.

Parameters
dstFirst addend, receives result.
srcVector to be added to 'dst'.

◆ aiVector3AreEqual()

ASSIMP_API int aiVector3AreEqual ( const C_STRUCT aiVector3D a,
const C_STRUCT aiVector3D b 
)

Check if 3D vectors are equal.

Parameters
aFirst vector to compare
bSecond vector to compare
Returns
1 if the vectors are equal
0 if the vectors are not equal

◆ aiVector3AreEqualEpsilon()

ASSIMP_API int aiVector3AreEqualEpsilon ( const C_STRUCT aiVector3D a,
const C_STRUCT aiVector3D b,
const float  epsilon 
)

Check if 3D vectors are equal using epsilon.

Parameters
aFirst vector to compare
bSecond vector to compare
epsilonEpsilon
Returns
1 if the vectors are equal
0 if the vectors are not equal

◆ aiVector3CrossProduct()

ASSIMP_API void aiVector3CrossProduct ( C_STRUCT aiVector3D dst,
const C_STRUCT aiVector3D a,
const C_STRUCT aiVector3D b 
)

Get cross product of 3D vectors.

Parameters
dstVector to receive the result.
aFirst vector
bSecond vector
Returns
The dot product of vectors

◆ aiVector3DivideByScalar()

ASSIMP_API void aiVector3DivideByScalar ( C_STRUCT aiVector3D dst,
const float  s 
)

Divide a 3D vector by a scalar.

Parameters
dstVector to be divided by s
sScalar divisor

◆ aiVector3DivideByVector()

ASSIMP_API void aiVector3DivideByVector ( C_STRUCT aiVector3D dst,
C_STRUCT aiVector3D v 
)

Divide each component of a 3D vector by the components of another vector.

Parameters
dstVector as the dividend
vVector as the divisor

◆ aiVector3DotProduct()

ASSIMP_API float aiVector3DotProduct ( const C_STRUCT aiVector3D a,
const C_STRUCT aiVector3D b 
)

Get the dot product of 3D vectors.

Parameters
aFirst vector
bSecond vector
Returns
The dot product of vectors

◆ aiVector3Length()

ASSIMP_API float aiVector3Length ( const C_STRUCT aiVector3D v)

Get the length of a 3D vector.

Returns
v Vector to evaluate

◆ aiVector3LessThan()

ASSIMP_API int aiVector3LessThan ( const C_STRUCT aiVector3D a,
const C_STRUCT aiVector3D b 
)

Check if vector a is less than vector b.

Parameters
aFirst vector to compare
bSecond vector to compare
epsilonEpsilon
Returns
1 if a is less than b
0 if a is equal or greater than b

◆ aiVector3Negate()

ASSIMP_API void aiVector3Negate ( C_STRUCT aiVector3D dst)

Negate a 3D vector.

Parameters
dstVector to be negated

◆ aiVector3Normalize()

ASSIMP_API void aiVector3Normalize ( C_STRUCT aiVector3D v)

Normalize a 3D vector.

Parameters
vVector to normalize

◆ aiVector3NormalizeSafe()

ASSIMP_API void aiVector3NormalizeSafe ( C_STRUCT aiVector3D v)

Check for division by zero and normalize a 3D vector.

Parameters
vVector to normalize

◆ aiVector3RotateByQuaternion()

ASSIMP_API void aiVector3RotateByQuaternion ( C_STRUCT aiVector3D v,
const C_STRUCT aiQuaternion q 
)

Rotate a 3D vector by a quaternion.

Parameters
vThe vector to rotate by q
qQuaternion to use to rotate v

◆ aiVector3Scale()

ASSIMP_API void aiVector3Scale ( C_STRUCT aiVector3D dst,
const float  s 
)

Multiply a 3D vector by a scalar.

Parameters
dstVector to be scaled by s
sScale factor

◆ aiVector3SquareLength()

ASSIMP_API float aiVector3SquareLength ( const C_STRUCT aiVector3D v)

Get the squared length of a 3D vector.

Returns
v Vector to evaluate

◆ aiVector3Subtract()

ASSIMP_API void aiVector3Subtract ( C_STRUCT aiVector3D dst,
const C_STRUCT aiVector3D src 
)

Subtract 3D vectors.

Parameters
dstMinuend, receives result.
srcVector to be subtracted from 'dst'.

◆ aiVector3SymMul()

ASSIMP_API void aiVector3SymMul ( C_STRUCT aiVector3D dst,
const C_STRUCT aiVector3D other 
)

Multiply each component of a 3D vector with the components of another vector.

Parameters
dstFirst vector, receives result
otherSecond vector