Cafu Engine
Loader_cmdl.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_CMDL_MODEL_LOADER_HPP_INCLUDED
8 #define CAFU_CMDL_MODEL_LOADER_HPP_INCLUDED
9 
10 #include "Loader.hpp"
11 
12 
13 struct lua_State;
14 
15 
16 /// This class loads a native Cafu (.cmdl) model file into a new Cafu model.
17 class LoaderCafuT : public ModelLoaderT
18 {
19  public:
20 
21  /// The constructor for loading a native Cafu (.cmdl) model file into a new Cafu model.
22  /// @param FileName The name of the .cmdl file to load.
23  /// @param Flags The flags to load the model with. See ModelLoaderT::FlagsT for details.
24  LoaderCafuT(const std::string& FileName, int Flags=NONE);
25 
26  /// The destructor.
27  ~LoaderCafuT();
28 
30  void Load(ArrayT<CafuModelT::SkinT>& Skins, const MaterialManagerImplT& MaterialMan);
31  void Load(ArrayT<CafuModelT::GuiFixtureT>& GuiFixtures);
32  void Load(ArrayT<CafuModelT::ChannelT>& Channels);
33  bool Load(unsigned int Level, CafuModelT*& DlodModel, float& DlodDist) { return false; }
34 
35 
36  private:
37 
38  static int SetVersion(lua_State* LuaState);
39 
40  lua_State* m_LuaState;
41  unsigned int m_Version;
42 };
43 
44 #endif
This class represents a native Cafu model.
Definition: Model_cmdl.hpp:45
bool Load(unsigned int Level, CafuModelT *&DlodModel, float &DlodDist)
Loads the dlod-model and dlod-distance at the given level.
Definition: Loader_cmdl.hpp:33
This class loads a native Cafu (.cmdl) model file into a new Cafu model.
Definition: Loader_cmdl.hpp:17
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
LoaderCafuT(const std::string &FileName, int Flags=NONE)
The constructor for loading a native Cafu (.cmdl) model file into a new Cafu model.
Definition: Loader_cmdl.cpp:19
~LoaderCafuT()
The destructor.
Definition: Loader_cmdl.cpp:66
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_cmdl.cpp:96