Cafu Engine
Loader_mdl.hpp
1 /*
2 Cafu Engine, http://www.cafu.de/
3 Copyright (c) Carsten Fuchs and other contributors.
4 This project is licensed under the terms of the MIT license.
5 */
6 
7 #ifndef CAFU_MDL_MODEL_LOADER_HPP_INCLUDED
8 #define CAFU_MDL_MODEL_LOADER_HPP_INCLUDED
9 
10 #include "Loader.hpp"
11 
12 
13 /// This class imports a HL1 (version 10) or a HL2 (version 48) model file into a new Cafu model.
14 class LoaderMdlT : public ModelLoaderT
15 {
16  public:
17 
18  /// The constructor for importing a HL1 (version 10) or a HL2 (version 48) model file into a new Cafu model.
19  /// @param FileName The name of the .mdl file to import.
20  /// @param Flags The flags to load the model with. See ModelLoaderT::FlagsT for details.
21  LoaderMdlT(const std::string& FileName, int Flags=NONE);
22 
23  /// The destructor.
24  ~LoaderMdlT();
25 
27  void Load(ArrayT<CafuModelT::SkinT>& Skins, const MaterialManagerImplT& MaterialMan);
28  void Load(ArrayT<CafuModelT::GuiFixtureT>& GuiFixtures);
29  void Load(ArrayT<CafuModelT::ChannelT>& Channels);
30  bool Load(unsigned int Level, CafuModelT*& DlodModel, float& DlodDist);
32 
33 
34  private:
35 
36  ModelLoaderT* m_Loader;
37 };
38 
39 #endif
This class represents a native Cafu model.
Definition: Model_cmdl.hpp:45
~LoaderMdlT()
The destructor.
Definition: Loader_mdl.cpp:47
The base class for importing arbitrary model files into Cafu models.
Definition: Loader.hpp:15
This class implements the MaterialManagerI interface.
Definition: MaterialManagerImpl.hpp:23
This class imports a HL1 (version 10) or a HL2 (version 48) model file into a new Cafu model...
Definition: Loader_mdl.hpp:14
void Postprocess(ArrayT< CafuModelT::MeshT > &Meshes)
Postprocesses the file data according to flags given to the constructor.
Definition: Loader_mdl.cpp:83
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.
Definition: Loader_mdl.cpp:53
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 mod...
Definition: Loader_mdl.cpp:12