Cafu Engine
Loader_md5.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_MD5_MODEL_LOADER_HPP_INCLUDED
8 #define CAFU_MD5_MODEL_LOADER_HPP_INCLUDED
9 
10 #include "Loader.hpp"
11 
12 
13 /// This class imports a Doom3 (.md5) model file into a new Cafu model.
14 class LoaderMd5T : public ModelLoaderT
15 {
16  public:
17 
18  /// The constructor for importing a Doom3 (.md5) model file into a new Cafu model.
19  /// @param FileName The name of the .md5 file to import.
20  /// @param Flags The flags to load the model with. See ModelLoaderT::FlagsT for details.
21  /// If FileName ends with "md5", it is assumed that the file has a white-space separated list of one md5mesh and arbitrarily many md5anim files.
22  /// If FileName ends with "md5mesh", this file is loaded without any animation information (e.g. for static detail models).
23  LoaderMd5T(const std::string& FileName, int Flags=NONE);
24 
26  void Load(ArrayT<CafuModelT::SkinT>& Skins, const MaterialManagerImplT& MaterialMan) { }
27  void Load(ArrayT<CafuModelT::GuiFixtureT>& GuiFixtures) { }
28  void Load(ArrayT<CafuModelT::ChannelT>& Channels) { }
29  bool Load(unsigned int Level, CafuModelT*& DlodModel, float& DlodDist) { return false; }
30 };
31 
32 
33 /// This class imports animations from Doom3 .md5anim files for addition to an existing CafuModelT.
35 {
36  public:
37 
38  ImporterMd5AnimT(const std::string& FileName);
39 
41 };
42 
43 #endif
void Load(ArrayT< CafuModelT::GuiFixtureT > &GuiFixtures)
Loads the GUI fixtures of the Cafu model.
Definition: Loader_md5.hpp:27
This class represents a native Cafu model.
Definition: Model_cmdl.hpp:45
The base class for importing additional animations into an existing CafuModelT.
Definition: Loader.hpp:115
This class imports animations from Doom3 .md5anim files for addition to an existing CafuModelT...
Definition: Loader_md5.hpp:34
bool Load(unsigned int Level, CafuModelT *&DlodModel, float &DlodDist)
Loads the dlod-model and dlod-distance at the given level.
Definition: Loader_md5.hpp:29
The base class for importing arbitrary model files into Cafu models.
Definition: Loader.hpp:15
void Load(ArrayT< CafuModelT::ChannelT > &Channels)
Loads the animation channels (groups of joints) of the Cafu model.
Definition: Loader_md5.hpp:28
This class implements the MaterialManagerI interface.
Definition: MaterialManagerImpl.hpp:23
ArrayT< CafuModelT::AnimT > Import(const ArrayT< CafuModelT::JointT > &Joints, const ArrayT< CafuModelT::MeshT > &Meshes)
Imports and returns the animation sequences from the file, optionally referring to the joints and mes...
Definition: Loader_md5.cpp:239
This class imports a Doom3 (.md5) model file into a new Cafu model.
Definition: Loader_md5.hpp:14
void Load(ArrayT< CafuModelT::SkinT > &Skins, const MaterialManagerImplT &MaterialMan)
Loads the skins of the Cafu model.
Definition: Loader_md5.hpp:26
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_md5.cpp:23
LoaderMd5T(const std::string &FileName, int Flags=NONE)
The constructor for importing a Doom3 (.md5) model file into a new Cafu model.
Definition: Loader_md5.cpp:17