Cafu Engine
Loader_dlod.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_DLOD_MODEL_LOADER_HPP_INCLUDED
8 #define CAFU_DLOD_MODEL_LOADER_HPP_INCLUDED
9 
10 #include "Loader.hpp"
11 
12 
13 /// This class loads a discrete-level-of-detail (.dlod) model file into a new Cafu model.
14 class LoaderDlodT : public ModelLoaderT
15 {
16  public:
17 
18  /// The constructor for loading a discrete-level-of-detail (.dlod) model file into a new Cafu model.
19  /// @param FileName The name of the .dlod file to load.
20  /// @param Flags The flags to load the model with. See ModelLoaderT::FlagsT for details.
21  LoaderDlodT(const std::string& FileName, int Flags=NONE);
22 
23  /// The destructor.
24  ~LoaderDlodT();
25 
26  const std::string& GetFileName() const;
28  void Load(ArrayT<CafuModelT::SkinT>& Skins, const MaterialManagerImplT& MaterialMan);
29  void Load(ArrayT<CafuModelT::GuiFixtureT>& GuiFixtures);
30  void Load(ArrayT<CafuModelT::ChannelT>& Channels);
31  bool Load(unsigned int Level, CafuModelT*& DlodModel, float& DlodDist);
32 
33 
34  private:
35 
36  LoaderDlodT(const LoaderDlodT&); ///< Use of the Copy Constructor is not allowed.
37  void operator = (const LoaderDlodT&); ///< Use of the Assignment Operator is not allowed.
38 
39  ArrayT<std::string> m_ModelNames; ///< The names of the concrete models in the dlod chain.
40  ArrayT<float> m_EndRanges;
41  ArrayT<ModelLoaderT*> m_ModelLoaders;
42 };
43 
44 #endif
This class represents a native Cafu model.
Definition: Model_cmdl.hpp:45
const std::string & GetFileName() const
Returns the file name of the imported model.
Definition: Loader_dlod.cpp:86
The base class for importing arbitrary model files into Cafu models.
Definition: Loader.hpp:15
This class loads a discrete-level-of-detail (.dlod) model file into a new Cafu model.
Definition: Loader_dlod.hpp:14
This class implements the MaterialManagerI interface.
Definition: MaterialManagerImpl.hpp:23
~LoaderDlodT()
The destructor.
Definition: Loader_dlod.cpp:79
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_dlod.cpp:94
LoaderDlodT(const std::string &FileName, int Flags=NONE)
The constructor for loading a discrete-level-of-detail (.dlod) model file into a new Cafu model...
Definition: Loader_dlod.cpp:17