Cafu Engine
LoaderMdlT Class Reference

This class imports a HL1 (version 10) or a HL2 (version 48) model file into a new Cafu model. More...

#include "Loader_mdl.hpp"

Inheritance diagram for LoaderMdlT:

Public Member Functions

 LoaderMdlT (const std::string &FileName, int Flags=NONE)
 The constructor for importing a HL1 (version 10) or a HL2 (version 48) model file into a new Cafu model. More...
 
 ~LoaderMdlT ()
 The destructor. 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...
 
void Postprocess (ArrayT< CafuModelT::MeshT > &Meshes)
 Postprocesses the file data according to flags given to the constructor. More...
 
- Public Member Functions inherited from ModelLoaderT
 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...
 

Additional Inherited Members

- Public Types inherited from ModelLoaderT
enum  FlagsT { NONE =0x00, REMOVE_DEGEN_TRIANGLES =0x01, REMOVE_UNUSED_VERTICES =0x02, REMOVE_UNUSED_WEIGHTS =0x04 }
 
- Protected Member Functions inherited from ModelLoaderT
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...
 
- Protected Attributes inherited from ModelLoaderT
const std::string m_FileName
 
const int m_Flags
 

Detailed Description

This class imports a HL1 (version 10) or a HL2 (version 48) model file into a new Cafu model.

Constructor & Destructor Documentation

LoaderMdlT::LoaderMdlT ( const std::string &  FileName,
int  Flags = NONE 
)

The constructor for importing a HL1 (version 10) or a HL2 (version 48) model file into a new Cafu model.

Parameters
FileNameThe name of the .mdl file to import.
FlagsThe flags to load the model with. See ModelLoaderT::FlagsT for details.
LoaderMdlT::~LoaderMdlT ( )

The destructor.

Member Function Documentation

void LoaderMdlT::Load ( ArrayT< CafuModelT::JointT > &  Joints,
ArrayT< CafuModelT::MeshT > &  Meshes,
ArrayT< CafuModelT::AnimT > &  Anims,
MaterialManagerImplT MaterialMan 
)
virtual

Actually loads the file data into the appropriate parts of the Cafu model.

Implements ModelLoaderT.

void LoaderMdlT::Load ( ArrayT< CafuModelT::SkinT > &  Skins,
const MaterialManagerImplT MaterialMan 
)
virtual

Loads the skins of the Cafu model.

Implements ModelLoaderT.

void LoaderMdlT::Load ( ArrayT< CafuModelT::GuiFixtureT > &  GuiFixtures)
virtual

Loads the GUI fixtures of the Cafu model.

Implements ModelLoaderT.

void LoaderMdlT::Load ( ArrayT< CafuModelT::ChannelT > &  Channels)
virtual

Loads the animation channels (groups of joints) of the Cafu model.

Implements ModelLoaderT.

bool LoaderMdlT::Load ( unsigned int  Level,
CafuModelT *&  DlodModel,
float &  DlodDist 
)
virtual

Loads the dlod-model and dlod-distance at the given level.

Implements ModelLoaderT.

void LoaderMdlT::Postprocess ( ArrayT< CafuModelT::MeshT > &  Meshes)
virtual

Postprocesses the file data according to flags given to the constructor.

Reimplemented from ModelLoaderT.


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