Assimp
v4.1. (December 2018)
|
Importer class to load MD3 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... | |
MD3Importer () | |
void | SetupProperties (const Importer *pImp) |
Called prior to ReadFile(). More... | |
~MD3Importer () | |
![]() | |
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 | ConvertPath (const char *texture_name, const char *header_path, std::string &out) const |
Convert a texture path in a MD3 file to a proper value. 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... | |
bool | ReadMultipartFile () |
Read a Q3 multipart file. More... | |
void | ReadShader (Q3Shader::ShaderData &fill) const |
Try to read the shader for a MD3 file. More... | |
void | ReadSkin (Q3Shader::SkinData &fill) const |
Try to read the skin for a MD3 file. More... | |
void | ValidateHeaderOffsets () |
Validate offsets in the header. More... | |
void | ValidateSurfaceHeaderOffsets (const MD3::Surface *pcSurfHeader) |
Protected Attributes | |
unsigned int | configFrameID |
Configuration option: frame to be loaded. More... | |
bool | configHandleMP |
Configuration option: process multi-part files. More... | |
std::string | configShaderFile |
Configuration option: name or path of shader. More... | |
std::string | configSkinFile |
Configuration option: name of skin file to be read. More... | |
bool | configSpeedFlag |
Configuration option: speed flag was set? More... | |
std::string | filename |
Pure file we're currently reading. More... | |
unsigned int | fileSize |
Size of the file, in bytes. More... | |
BE_NCONST unsigned char * | mBuffer |
File buffer More... | |
std::string | mFile |
Current file name. More... | |
IOSystem * | mIOHandler |
IO system to be used to access the data. More... | |
aiScene * | mScene |
Output scene to be filled. More... | |
std::string | path |
Current base directory More... | |
BE_NCONST MD3::Header * | pcHeader |
Header of the MD3 file. More... | |
![]() | |
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 | |
![]() | |
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 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... | |
![]() | |
std::map< ImporterUnits, double > | importerUnits |
Assimp Importer unit conversions available if you need another measurment unit add it below. More... | |
MD3Importer::MD3Importer | ( | ) |
MD3Importer::~MD3Importer | ( | ) |
|
virtual |
Returns whether the class can handle the format of the given file.
See BaseImporter::CanRead() for details.
Implements Assimp::BaseImporter.
|
protected |
|
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 |
Read a Q3 multipart file.
|
protected |
Try to read the shader for a MD3 file.
fill | Receives output information |
|
protected |
Try to read the skin for a MD3 file.
fill | Receives output information |
|
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 |
Validate offsets in the header.
|
protected |
|
protected |
Configuration option: frame to be loaded.
|
protected |
Configuration option: process multi-part files.
|
protected |
Configuration option: name or path of shader.
|
protected |
Configuration option: name of skin file to be read.
|
protected |
Configuration option: speed flag was set?
|
protected |
Pure file we're currently reading.
|
protected |
Size of the file, in bytes.
|
protected |
File buffer
|
protected |
Current file name.
|
protected |
IO system to be used to access the data.
|
protected |
Output scene to be filled.
|
protected |
Current base directory
|
protected |
Header of the MD3 file.