Assimp  v2.0 (November 2010)
Classes | Namespaces | Defines | Functions
assimp.hpp File Reference

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

Classes

class  Assimp::Importer
 CPP-API: The Importer class forms an C++ interface to the functionality of the Open Asset Import Library. More...

Namespaces

namespace  Assimp
 

Assimp's CPP-API and all internal APIs.


Defines

#define AI_PROPERTY_WAS_NOT_EXISTING   0xffffffff
 namespace Assimp

Functions

ASSIMP_API const aiSceneaiImportFileEx (const char *, unsigned int, aiFileIO *)
ASSIMP_API const aiSceneaiImportFileFromMemory (const char *, unsigned int, unsigned int, const char *)

Detailed Description

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


Define Documentation

#define AI_PROPERTY_WAS_NOT_EXISTING   0xffffffff

namespace Assimp


Function Documentation

ASSIMP_API const aiScene* aiImportFileEx ( const char *  ,
unsigned  int,
aiFileIO  
)

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.
Returns:
Pointer to the imported data or NULL if the import failed.
Note:
Include <aiFileIO.h> for the definition of aiFileIO.
ASSIMP_API const aiScene* aiImportFileFromMemory ( const char *  ,
unsigned  int,
unsigned  int,
const char *   
)

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 spreading their data across multiple files or even directories. Examples include OBJ or MD3, which outsource parts of their material stuff into external scripts. If you need the full functionality, provide a custom IOSystem to make Assimp find these files.