Cafu Engine
1 /*
2 Cafu Engine,
3 Copyright (c) Carsten Fuchs and other contributors.
4 This project is licensed under the terms of the MIT license.
5 */
10 #include "Loader.hpp"
13 /// This class loads a "dummy model" into a new Cafu model.
14 /// A dummy model consists of a single, fixed mesh in the shape of a cone.
15 ///
16 /// While the given string \c FileName is recorded as the filename of the model,
17 /// no attempt is made to actually load the model from the specified file.
18 /// Instead, the "loaded" data is hard-wired in the code.
19 /// As a result, this loader cannot fail and never throws a LoadErrorT exception.
20 ///
21 /// This is usually used when the proper loader for the file could not load the model
22 /// (e.g. due to file not found or an error inside the file), and the caller wishes to
23 /// deal with the problem by substituting a visual replacement that is guaranteed to work.
24 class LoaderDummyT : public ModelLoaderT
25 {
26  public:
28  /// The constructor for loading a "dummy model" into a new Cafu model.
29  /// @param FileName The name of the dummy file to load. See however the description of the LoaderDummyT class for details!
30  /// @param Flags This parameter is ignored. It just exists for consistency with the other loaders.
31  LoaderDummyT(const std::string& FileName, int Flags=NONE);
34  void Load(ArrayT<CafuModelT::SkinT>& Skins, const MaterialManagerImplT& MaterialMan);
35  void Load(ArrayT<CafuModelT::GuiFixtureT>& GuiFixtures);
36  void Load(ArrayT<CafuModelT::ChannelT>& Channels);
37  bool Load(unsigned int Level, CafuModelT*& DlodModel, float& DlodDist);
38 };
40 #endif
This class represents a native Cafu model.
Definition: Model_cmdl.hpp:45
This class loads a "dummy model" into a new Cafu model.
Definition: Loader_dummy.hpp:24
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
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_dummy.cpp:40
LoaderDummyT(const std::string &FileName, int Flags=NONE)
The constructor for loading a "dummy model" into a new Cafu model.
Definition: Loader_dummy.cpp:12