|
Assimp
v4.1. (December 2018)
|
Represents the full data structure information for a single BLEND file. More...
Public Types | |
| typedef std::shared_ptr< ElemBase >(Structure::* | AllocProcPtr) () const |
| typedef void(Structure::* | ConvertProcPtr) (std::shared_ptr< ElemBase > in, const FileDatabase &) const |
| typedef std::pair< AllocProcPtr, ConvertProcPtr > | FactoryPair |
Public Member Functions | |
| void | AddPrimitiveStructures () |
| Add structure definitions for all the primitive types, i.e. More... | |
| std::shared_ptr< ElemBase > | ConvertBlobToStructure (const Structure &structure, const FileDatabase &db) const |
| Take an input blob from the stream, interpret it according to a its structure name and convert it to the intermediate representation. More... | |
| const Structure * | Get (const std::string &ss) const |
| FactoryPair | GetBlobToStructureConverter (const Structure &structure, const FileDatabase &db) const |
| Find a suitable conversion function for a given Structure. More... | |
| const Structure & | operator[] (const size_t i) const |
| Access a structure by its index. More... | |
| const Structure & | operator[] (const std::string &ss) const |
| Access a structure by its canonical name, the pointer version returns NULL on failure while the reference version raises an error. More... | |
| void | RegisterConverters () |
Fill the converters member with converters for all known data types. More... | |
Static Public Member Functions | |
| static void | ExtractArraySize (const std::string &out, size_t array_sizes[2]) |
Extract array dimensions from a C array declaration, such as ...[4][6]. More... | |
Public Attributes | |
| std::map< std::string, FactoryPair > | converters |
| std::map< std::string, size_t > | indices |
| vector< Structure > | structures |
Represents the full data structure information for a single BLEND file.
This data is extracted from the DNA1 chunk in the file. #DNAParser does the reading and represents currently the only place where DNA is altered.
| typedef std::shared_ptr<ElemBase>( Structure::* Assimp::Blender::DNA::AllocProcPtr) () const |
| typedef void(Structure::* Assimp::Blender::DNA::ConvertProcPtr) (std::shared_ptr< ElemBase > in, const FileDatabase &) const |
| typedef std::pair< AllocProcPtr, ConvertProcPtr > Assimp::Blender::DNA::FactoryPair |
| void DNA::AddPrimitiveStructures | ( | ) |
Add structure definitions for all the primitive types, i.e.
integer, short, char, float
| std::shared_ptr< ElemBase > DNA::ConvertBlobToStructure | ( | const Structure & | structure, |
| const FileDatabase & | db | ||
| ) | const |
Take an input blob from the stream, interpret it according to a its structure name and convert it to the intermediate representation.
| structure | Destination structure definition |
| db | File database. |
|
static |
Extract array dimensions from a C array declaration, such as ...[4][6].
Returned string would be ...[][].
| out | |
| array_sizes | Receive maximally two array dimensions, the second element is set to 1 if the array is flat. Both are set to 1 if the input is not an array. |
| DeadlyImportError | if more than 2 dimensions are encountered. |
|
inline |
| DNA::FactoryPair DNA::GetBlobToStructureConverter | ( | const Structure & | structure, |
| const FileDatabase & | db | ||
| ) | const |
Find a suitable conversion function for a given Structure.
Such a converter function takes a blob from the input stream, reads as much as it needs, and builds up a complete object in intermediate representation.
| structure | Destination structure definition |
| db | File database. |
|
inline |
Access a structure by its index.
|
inline |
Access a structure by its canonical name, the pointer version returns NULL on failure while the reference version raises an error.
| void DNA::RegisterConverters | ( | ) |
Fill the converters member with converters for all known data types.
The implementation of this method is in BlenderScene.cpp and is machine-generated. Converters are used to quickly handle objects whose exact data type is a runtime-property and not yet known at compile time (consier Object::data).
| std::map<std::string, FactoryPair > Assimp::Blender::DNA::converters |
| std::map<std::string, size_t> Assimp::Blender::DNA::indices |