Assimp  v3.1.1 (June 2014)
Assimp::LWOImporter Class Reference

Class to load LWO 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...
 
 LWOImporter ()
 
void SetupProperties (const Importer *pImp)
 Called prior to ReadFile(). More...
 
 ~LWOImporter ()
 
- Public Member Functions inherited from Assimp::BaseImporter
 BaseImporter ()
 Constructor to be privately used by Importer. More...
 
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...
 
aiScene * ReadFile (const Importer *pImp, const std::string &pFile, IOSystem *pIOHandler)
 Imports the given file and returns the imported data. More...
 
virtual ~BaseImporter ()
 Destructor, private as well. More...
 

Protected Member Functions

const aiImporterDesc * GetInfo () const
 Called by #Importer::GetImporterInfo to get a description of some loader features. More...
 
void InternReadFile (const std::string &pFile, aiScene *pScene, IOSystem *pIOHandler)
 Imports the given file into the given scene structure. More...
 

Protected Attributes

unsigned int configLayerIndex
 Configuration option: index of layer to be loaded. More...
 
std::string configLayerName
 Configuration option: name of layer to be loaded. More...
 
bool configSpeedFlag
 Configuration option: speed flag set? More...
 
unsigned int fileSize
 Size of the file, in bytes. More...
 
bool hasNamedLayer
 True if we have a named layer. More...
 
ClipList mClips
 Temporary clip list from the file. More...
 
LWO::Layer * mCurLayer
 Pointer to the current layer. More...
 
EnvelopeList mEnvelopes
 Temporary envelope list from the file. More...
 
uint8_t * mFileBuffer
 file buffer More...
 
bool mIsLWO2
 true if the file is a LWO2 file More...
 
bool mIsLXOB
 true if the file is a LXOB file More...
 
LayerList * mLayers
 Temporary list of layers from the file. More...
 
TagMappingTable * mMapping
 Mapping table to convert from tag to surface indices. More...
 
SurfaceList * mSurfaces
 Temporary surface list from the file. More...
 
TagList * mTags
 Temporary tag list from the file. More...
 
aiScene * pScene
 Output scene. More...
 
- Protected Attributes inherited from Assimp::BaseImporter
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
- 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)
 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...
 

Detailed Description

Class to load LWO files.

Note
Methods named "xxxLWO2[xxx]" are used with the newer LWO2 format. Methods named "xxxLWOB[xxx]" are used with the older LWOB format. Methods named "xxxLWO[xxx]" are used with both formats. Methods named "xxx" are used to preprocess the loaded data - they aren't specific to one format version

Constructor & Destructor Documentation

LWOImporter::LWOImporter ( )
LWOImporter::~LWOImporter ( )

Member Function Documentation

bool LWOImporter::CanRead ( const std::string &  pFile,
IOSystem *  pIOHandler,
bool  checkSig 
) const
virtual

Returns whether the class can handle the format of the given file.

See BaseImporter::CanRead() for details.

Implements Assimp::BaseImporter.

const aiImporterDesc * LWOImporter::GetInfo ( ) const
protectedvirtual

Called by #Importer::GetImporterInfo to get a description of some loader features.

Importers must provide this information.

Implements Assimp::BaseImporter.

void LWOImporter::InternReadFile ( const std::string &  pFile,
aiScene *  pScene,
IOSystem *  pIOHandler 
)
protectedvirtual

Imports the given file into the given scene structure.

See BaseImporter::InternReadFile() for details

Implements Assimp::BaseImporter.

void LWOImporter::SetupProperties ( const Importer *  pImp)
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.

Member Data Documentation

unsigned int Assimp::LWOImporter::configLayerIndex
protected

Configuration option: index of layer to be loaded.

std::string Assimp::LWOImporter::configLayerName
protected

Configuration option: name of layer to be loaded.

bool Assimp::LWOImporter::configSpeedFlag
protected

Configuration option: speed flag set?

unsigned int Assimp::LWOImporter::fileSize
protected

Size of the file, in bytes.

bool Assimp::LWOImporter::hasNamedLayer
protected

True if we have a named layer.

ClipList Assimp::LWOImporter::mClips
protected

Temporary clip list from the file.

LWO::Layer* Assimp::LWOImporter::mCurLayer
protected

Pointer to the current layer.

EnvelopeList Assimp::LWOImporter::mEnvelopes
protected

Temporary envelope list from the file.

uint8_t* Assimp::LWOImporter::mFileBuffer
protected

file buffer

bool Assimp::LWOImporter::mIsLWO2
protected

true if the file is a LWO2 file

bool Assimp::LWOImporter::mIsLXOB
protected

true if the file is a LXOB file

LayerList* Assimp::LWOImporter::mLayers
protected

Temporary list of layers from the file.

TagMappingTable* Assimp::LWOImporter::mMapping
protected

Mapping table to convert from tag to surface indices.

UINT_MAX indicates that a no corresponding surface is available

SurfaceList* Assimp::LWOImporter::mSurfaces
protected

Temporary surface list from the file.

TagList* Assimp::LWOImporter::mTags
protected

Temporary tag list from the file.

aiScene* Assimp::LWOImporter::pScene
protected

Output scene.


The documentation for this class was generated from the following files: