This class imports a Doom3 (.md5) model file into a new Cafu model. More...
#include "Loader_md5.hpp"
Public Member Functions | |
LoaderMd5T (const std::string &FileName, int Flags=NONE) | |
The constructor for importing a Doom3 (.md5) model file into a new Cafu model. More... | |
void | Load (ArrayT< CafuModelT::JointT > &Joints, ArrayT< CafuModelT::MeshT > &Meshes, ArrayT< CafuModelT::AnimT > &Anims, MaterialManagerImplT &MaterialMan) |
Actually loads the file data into the appropriate parts of the Cafu model. More... | |
void | Load (ArrayT< CafuModelT::SkinT > &Skins, const MaterialManagerImplT &MaterialMan) |
Loads the skins of the Cafu model. More... | |
void | Load (ArrayT< CafuModelT::GuiFixtureT > &GuiFixtures) |
Loads the GUI fixtures of the Cafu model. More... | |
void | Load (ArrayT< CafuModelT::ChannelT > &Channels) |
Loads the animation channels (groups of joints) of the Cafu model. More... | |
bool | Load (unsigned int Level, CafuModelT *&DlodModel, float &DlodDist) |
Loads the dlod-model and dlod-distance at the given level. More... | |
![]() | |
ModelLoaderT (const std::string &FileName, int Flags) | |
The constructor. More... | |
virtual | ~ModelLoaderT () |
The virtual destructor. More... | |
virtual const std::string & | GetFileName () const |
Returns the file name of the imported model. More... | |
virtual void | Postprocess (ArrayT< CafuModelT::MeshT > &Meshes) |
Postprocesses the file data according to flags given to the constructor. More... | |
Additional Inherited Members | |
![]() | |
enum | FlagsT { NONE =0x00, REMOVE_DEGEN_TRIANGLES =0x01, REMOVE_UNUSED_VERTICES =0x02, REMOVE_UNUSED_WEIGHTS =0x04 } |
![]() | |
void | RemoveDegenTriangles (CafuModelT::MeshT &Mesh) |
Removes triangles with zero-length edges from the given mesh. More... | |
void | RemoveUnusedVertices (CafuModelT::MeshT &Mesh) |
Removes unused vertices from the given mesh. More... | |
void | AbandonDuplicateWeights (CafuModelT::MeshT &Mesh) |
Makes sure that vertices that are geo-dups of each other refer to the same set of weights. More... | |
void | RemoveUnusedWeights (CafuModelT::MeshT &Mesh) |
Removes unused weights from the given mesh (should be called after RemoveUnusedVertices()). More... | |
MaterialT | CreateDefaultMaterial (const std::string &MatName, bool EditorSave=true) const |
Creates and returns a fail-safe wire-frame material with the given name, for use when a material with more detailed or more specific settings is not available. More... | |
![]() | |
const std::string | m_FileName |
const int | m_Flags |
This class imports a Doom3 (.md5) model file into a new Cafu model.
LoaderMd5T::LoaderMd5T | ( | const std::string & | FileName, |
int | Flags = NONE |
||
) |
The constructor for importing a Doom3 (.md5) model file into a new Cafu model.
FileName | The name of the .md5 file to import. |
Flags | The flags to load the model with. See ModelLoaderT::FlagsT for details. If FileName ends with "md5", it is assumed that the file has a white-space separated list of one md5mesh and arbitrarily many md5anim files. If FileName ends with "md5mesh", this file is loaded without any animation information (e.g. for static detail models). |
|
virtual |
Actually loads the file data into the appropriate parts of the Cafu model.
Implements ModelLoaderT.
|
inlinevirtual |
Loads the skins of the Cafu model.
Implements ModelLoaderT.
|
inlinevirtual |
Loads the GUI fixtures of the Cafu model.
Implements ModelLoaderT.
|
inlinevirtual |
Loads the animation channels (groups of joints) of the Cafu model.
Implements ModelLoaderT.
|
inlinevirtual |
Loads the dlod-model and dlod-distance at the given level.
Implements ModelLoaderT.