Cafu Engine
Loader_fbx.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_FBX_MODEL_LOADER_HPP_INCLUDED
8 #define CAFU_FBX_MODEL_LOADER_HPP_INCLUDED
9 
10 #include "Loader.hpp"
11 
12 
13 /// This class uses the Autodesk FBX SDK in order to load a model file into a new Cafu model.
14 class LoaderFbxT : public ModelLoaderT
15 {
16  public:
17 
18  /// The constructor for loading an Autodesk FBX (.fbx) model file into a new Cafu model.
19  /// @param FileName The name of the file to load.
20  /// @param UserCallbacks An implementation of the UserCallbacksI interface.
21  /// @param Flags The flags to load the model with. See ModelLoaderT::FlagsT for details.
22  LoaderFbxT(const std::string& FileName, UserCallbacksI& UserCallbacks, int Flags=NONE);
23 
24  /// The destructor.
25  ~LoaderFbxT();
26 
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) { return false; }
32 
33 
34  private:
35 
36  LoaderFbxT(const LoaderFbxT&); ///< Use of the Copy Constructor is not allowed.
37  void operator = (const LoaderFbxT&); ///< Use of the Assignment Operator is not allowed.
38 
39  class FbxSceneT;
40  FbxSceneT* m_FbxScene; ///< We use the PIMPL idiom because we cannot forward-declare the FBX SDK classes without hard-wiring the version dependent name of their namespace.
41 };
42 
43 #endif
This class represents a native Cafu model.
Definition: Model_cmdl.hpp:45
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_fbx.cpp:897
void Load(ArrayT< CafuModelT::ChannelT > &Channels)
Loads the animation channels (groups of joints) of the Cafu model.
Definition: Loader_fbx.hpp:30
~LoaderFbxT()
The destructor.
Definition: Loader_fbx.cpp:896
The base class for importing arbitrary model files into Cafu models.
Definition: Loader.hpp:15
An interface for user callbacks.
Definition: Loader.hpp:89
This class implements the MaterialManagerI interface.
Definition: MaterialManagerImpl.hpp:23
bool Load(unsigned int Level, CafuModelT *&DlodModel, float &DlodDist)
Loads the dlod-model and dlod-distance at the given level.
Definition: Loader_fbx.hpp:31
LoaderFbxT(const std::string &FileName, UserCallbacksI &UserCallbacks, int Flags=NONE)
The constructor for loading an Autodesk FBX (.fbx) model file into a new Cafu model.
Definition: Loader_fbx.cpp:889
This class uses the Autodesk FBX SDK in order to load a model file into a new Cafu model...
Definition: Loader_fbx.hpp:14