The XFileImporter is a worker class capable of importing a scene from a DirectX file .x.
More...
Inherits Assimp::BaseImporter.
|
enum | TextFileMode { ALLOW_EMPTY
, FORBID_EMPTY
} |
|
static bool | CheckMagicToken (IOSystem *pIOHandler, const std::string &pFile, const void *magic, unsigned int num, unsigned int offset=0, unsigned int size=4) |
| Check whether a file starts with one or more magic tokens. More...
|
|
static void | ConvertToUTF8 (std::vector< char > &data) |
| An utility for all text file loaders. More...
|
|
static void | ConvertUTF8toISO8859_1 (std::string &data) |
| An utility for all text file loaders. More...
|
|
template<typename T > |
static AI_FORCE_INLINE void | CopyVector (std::vector< T > &vec, T *&out, unsigned int &outLength) |
| Utility function to move a std::vector into a aiScene array. More...
|
|
static std::string | GetExtension (const std::string &pFile) |
| Extract file extension from a string. More...
|
|
static bool | SearchFileHeaderForToken (IOSystem *pIOSystem, const std::string &file, const char **tokens, unsigned int numTokens, unsigned int searchBytes=200, bool tokensSol=false) |
| A utility for CanRead(). More...
|
|
static bool | SimpleExtensionCheck (const std::string &pFile, const char *ext0, const char *ext1=NULL, const char *ext2=NULL) |
| Check whether a file has a specific file extension. More...
|
|
static void | TextFileToBuffer (IOStream *stream, std::vector< char > &data, TextFileMode mode=FORBID_EMPTY) |
| Utility for text file loaders which copies the contents of the file into a memory buffer and converts it to our UTF8 representation. More...
|
|
The XFileImporter is a worker class capable of importing a scene from a DirectX file .x.
◆ XFileImporter()
XFileImporter::XFileImporter |
( |
| ) |
|
◆ ~XFileImporter()
XFileImporter::~XFileImporter |
( |
| ) |
|
◆ CanRead()
bool XFileImporter::CanRead |
( |
const std::string & |
pFile, |
|
|
IOSystem * |
pIOHandler, |
|
|
bool |
CheckSig |
|
) |
| const |
|
virtual |
◆ ConvertMaterials()
Converts all materials in the given array and stores them in the scene's material list.
- Parameters
-
pScene | The scene to hold the converted materials. |
pMaterials | The material array to convert. |
◆ CreateAnimations()
Converts the animations from the given imported data and creates them in the scene.
- Parameters
-
pScene | The scene to hold to converted animations |
pData | The data to read the animations from |
◆ CreateDataRepresentationFromImport()
void XFileImporter::CreateDataRepresentationFromImport |
( |
aiScene * |
pScene, |
|
|
XFile::Scene * |
pData |
|
) |
| |
|
protected |
Constructs the return data structure out of the imported data.
- Parameters
-
pScene | The scene to construct the return data in. |
pData | The imported data in the internal temporary representation. |
◆ CreateMeshes()
Converts all meshes in the given mesh array.
Each mesh is split up per material, the indices of the generated meshes are stored in the node structure.
- Parameters
-
pScene | The scene to construct the return data in. |
pNode | The target node structure that references the constructed meshes. |
pMeshes | The array of meshes to convert |
◆ CreateNodes()
Recursively creates scene nodes from the imported hierarchy.
The meshes and materials of the nodes will be extracted on the way.
- Parameters
-
pScene | The scene to construct the return data in. |
pParent | The parent node where to create new child nodes |
pNode | The temporary node to copy. |
- Returns
- The created node
◆ GetInfo()
Return importer meta information.
See #BaseImporter::GetInfo for the details
Implements Assimp::BaseImporter.
◆ InternReadFile()
void XFileImporter::InternReadFile |
( |
const std::string & |
pFile, |
|
|
aiScene * |
pScene, |
|
|
IOSystem * |
pIOHandler |
|
) |
| |
|
protectedvirtual |
◆ mBuffer
std::vector<char> Assimp::XFileImporter::mBuffer |
|
protected |
Buffer to hold the loaded file.
The documentation for this class was generated from the following files: