|
Assimp
v4.1. (December 2018)
|
Importer class for 3D Studio r3 and r4 3DS files. More...
Inherits Assimp::BaseImporter.
Public Member Functions | |
| bool | CanRead (const std::string &pFile, IOSystem *pIOHandler, bool checkSig) const |
| Returns whether the class can handle the format of the given file. More... | |
| Discreet3DSImporter () | |
| void | SetupProperties (const Importer *pImp) |
| Called prior to ReadFile(). More... | |
| ~Discreet3DSImporter () | |
Public Member Functions inherited from Assimp::BaseImporter | |
| BaseImporter () AI_NO_EXCEPT | |
| Constructor to be privately used by Importer. More... | |
| virtual const ImporterUnits & | GetApplicationUnits () |
| const std::string & | GetErrorText () const |
| Returns the error description of the last error that occurred. More... | |
| void | GetExtensionList (std::set< std::string > &extensions) |
| Called by #Importer::GetExtensionList for each loaded importer. More... | |
| virtual double | GetFileScale () const |
| aiScene * | ReadFile (Importer *pImp, const std::string &pFile, IOSystem *pIOHandler) |
| Imports the given file and returns the imported data. More... | |
| virtual void | SetApplicationUnits (const ImporterUnits &unit) |
| virtual void | SetFileScale (double scale) |
| Will be called only by scale process when scaling is requested. More... | |
| virtual | ~BaseImporter () |
| Destructor, private as well. More... | |
Protected Member Functions | |
| void | AddNodeToGraph (aiScene *pcSOut, aiNode *pcOut, D3DS::Node *pcIn, aiMatrix4x4 &absTrafo) |
| Add a node to the node graph. More... | |
| void | ApplyMasterScale (aiScene *pScene) |
| Apply the master scaling factor to the mesh. More... | |
| void | CheckIndices (D3DS::Mesh &sMesh) |
| Clamp all indices in the file to a valid range. More... | |
| void | ConvertMaterial (D3DS::Material &p_cMat, aiMaterial &p_pcOut) |
| Converts a temporary material to the outer representation. More... | |
| void | ConvertMeshes (aiScene *pcOut) |
| Convert the meshes in the file. More... | |
| void | ConvertScene (aiScene *pcOut) |
| Convert the whole scene. More... | |
| void | GenerateNodeGraph (aiScene *pcOut) |
| Generate the nodegraph. More... | |
| const aiImporterDesc * | GetInfo () const |
| Return importer meta information. More... | |
| void | InternReadFile (const std::string &pFile, aiScene *pScene, IOSystem *pIOHandler) |
| Imports the given file into the given scene structure. More... | |
| void | InverseNodeSearch (D3DS::Node *pcNode, D3DS::Node *pcCurrent) |
| Search for a node in the graph. More... | |
| void | MakeUnique (D3DS::Mesh &sMesh) |
| generate unique vertices for a mesh More... | |
| void | ParseCameraChunk () |
| Parse a camera chunk in the file. More... | |
| void | ParseChunk (const char *name, unsigned int num) |
| Parse a top-level chunk in the file. More... | |
| void | ParseColorChunk (aiColor3D *p_pcOut, bool p_bAcceptPercent=true) |
| Parse a color chunk. More... | |
| void | ParseEditorChunk () |
| Parse a top-level editor chunk in the file. More... | |
| void | ParseFaceChunk () |
| Parse a face list chunk in the file. More... | |
| void | ParseHierarchyChunk (uint16_t parent) |
| Parse a hierarchy chunk in the file. More... | |
| void | ParseKeyframeChunk () |
| Parse a keyframe chunk in the file. More... | |
| void | ParseLightChunk () |
| Parse a light chunk in the file. More... | |
| void | ParseMainChunk () |
| Parse a main top-level chunk in the file. More... | |
| void | ParseMaterialChunk () |
| Parse a material chunk in the file. More... | |
| void | ParseMeshChunk () |
| Parse a mesh chunk in the file. More... | |
| void | ParseObjectChunk () |
| Parse a top-level object chunk in the file. More... | |
| ai_real | ParsePercentageChunk () |
| Parse a percentage chunk. More... | |
| void | ParseTextureChunk (D3DS::Texture *pcOut) |
| Parse a texture chunk in the file. More... | |
| void | ReadChunk (Discreet3DS::Chunk *pcOut) |
| Read a chunk. More... | |
| void | ReplaceDefaultMaterial () |
| Replace the default material in the scene. More... | |
| void | SkipChunk () |
| Skip a chunk in the file. More... | |
| void | SkipTCBInfo () |
| Skip the TCB info in a track key. More... | |
Protected Attributes | |
| bool | bHasBG |
| bool | bIsPrj |
| true if PRJ file More... | |
| std::string | mBackgroundImage |
| Path to the background image of the scene. More... | |
| aiColor3D | mClrAmbient |
| Ambient base color of the scene. More... | |
| D3DS::Node * | mCurrentNode |
| Current node, root node. More... | |
| short | mLastNodeIndex |
| Last touched node index. More... | |
| ai_real | mMasterScale |
| Master scaling factor of the scene. More... | |
| D3DS::Node * | mRootNode |
| D3DS::Scene * | mScene |
| Scene under construction. More... | |
| StreamReaderLE * | stream |
| Stream to read from. More... | |
Protected Attributes inherited from Assimp::BaseImporter | |
| ImporterUnits | applicationUnits = ImporterUnits::M |
| double | fileScale = 1.0 |
| double | importerScale = 1.0 |
| std::string | m_ErrorText |
| Error description in case there was one. More... | |
| ProgressHandler * | m_progress |
| Currently set progress handler. More... | |
Additional Inherited Members | |
Public Types inherited from Assimp::BaseImporter | |
| enum | ImporterUnits { M, MM, CM, INCHES, FEET } |
| enum | TextFileMode { ALLOW_EMPTY, FORBID_EMPTY } |
| Enum to define, if empty files are ok or not. More... | |
Static Public Member Functions inherited from Assimp::BaseImporter | |
| 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, bool noAlphaBeforeTokens=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... | |
Public Attributes inherited from Assimp::BaseImporter | |
| std::map< ImporterUnits, double > | importerUnits |
| Assimp Importer unit conversions available if you need another measurment unit add it below. More... | |
Importer class for 3D Studio r3 and r4 3DS files.
| Discreet3DSImporter::Discreet3DSImporter | ( | ) |
| Discreet3DSImporter::~Discreet3DSImporter | ( | ) |
|
protected |
Add a node to the node graph.
|
protected |
Apply the master scaling factor to the mesh.
|
virtual |
Returns whether the class can handle the format of the given file.
See BaseImporter::CanRead() for details.
Implements Assimp::BaseImporter.
|
protected |
Clamp all indices in the file to a valid range.
|
protected |
Converts a temporary material to the outer representation.
|
protected |
Convert the meshes in the file.
|
protected |
Convert the whole scene.
|
protected |
Generate the nodegraph.
|
protectedvirtual |
Return importer meta information.
See #BaseImporter::GetInfo for the details
Implements Assimp::BaseImporter.
|
protectedvirtual |
Imports the given file into the given scene structure.
See BaseImporter::InternReadFile() for details
Implements Assimp::BaseImporter.
|
protected |
Search for a node in the graph.
Called recursively
|
protected |
generate unique vertices for a mesh
|
protected |
Parse a camera chunk in the file.
|
protected |
Parse a top-level chunk in the file.
|
protected |
Parse a color chunk.
mCurrent will point to the next chunk behind afterwards. If no color chunk is found QNAN is returned in all members.
|
protected |
Parse a top-level editor chunk in the file.
|
protected |
Parse a face list chunk in the file.
|
protected |
Parse a hierarchy chunk in the file.
|
protected |
Parse a keyframe chunk in the file.
|
protected |
Parse a light chunk in the file.
|
protected |
Parse a main top-level chunk in the file.
|
protected |
Parse a material chunk in the file.
|
protected |
Parse a mesh chunk in the file.
|
protected |
Parse a top-level object chunk in the file.
|
protected |
Parse a percentage chunk.
mCurrent will point to the next chunk behind afterwards. If no percentage chunk is found QNAN is returned.
|
protected |
Parse a texture chunk in the file.
|
protected |
Read a chunk.
| pcOut | Receives the current chunk |
|
protected |
Replace the default material in the scene.
|
virtual |
Called prior to ReadFile().
The function is a request to the importer to update its configuration basing on the Importer's configuration property list.
Reimplemented from Assimp::BaseImporter.
|
protected |
Skip a chunk in the file.
|
protected |
Skip the TCB info in a track key.
|
protected |
|
protected |
true if PRJ file
|
protected |
Path to the background image of the scene.
|
protected |
Ambient base color of the scene.
|
protected |
Current node, root node.
|
protected |
Last touched node index.
|
protected |
Master scaling factor of the scene.
|
protected |
|
protected |
Scene under construction.
|
protected |
Stream to read from.