This class loads a "dummy model" into a new Cafu model. More...
#include "Loader_dummy.hpp"
Public Member Functions | |
LoaderDummyT (const std::string &FileName, int Flags=NONE) | |
The constructor for loading a "dummy model" 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... | |
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... | |
virtual void | Postprocess (ArrayT< CafuModelT::MeshT > &Meshes) |
Postprocesses the file data according to flags given to the constructor. 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 |
This class loads a "dummy model" into a new Cafu model.
A dummy model consists of a single, fixed mesh in the shape of a cone.
While the given string FileName
is recorded as the filename of the model, no attempt is made to actually load the model from the specified file. Instead, the "loaded" data is hard-wired in the code. As a result, this loader cannot fail and never throws a LoadErrorT exception.
This is usually used when the proper loader for the file could not load the model (e.g. due to file not found or an error inside the file), and the caller wishes to deal with the problem by substituting a visual replacement that is guaranteed to work.
LoaderDummyT::LoaderDummyT | ( | const std::string & | FileName, |
int | Flags = NONE |
||
) |
The constructor for loading a "dummy model" into a new Cafu model.
FileName | The name of the dummy file to load. See however the description of the LoaderDummyT class for details! |
Flags | This parameter is ignored. It just exists for consistency with the other loaders. |
|
virtual |
Actually loads the file data into the appropriate parts of the Cafu model.
Implements ModelLoaderT.
|
virtual |
Loads the skins of the Cafu model.
Implements ModelLoaderT.
|
virtual |
Loads the GUI fixtures of the Cafu model.
Implements ModelLoaderT.
|
virtual |
Loads the animation channels (groups of joints) of the Cafu model.
Implements ModelLoaderT.
|
virtual |
Loads the dlod-model and dlod-distance at the given level.
Implements ModelLoaderT.