7 #ifndef CAFU_GUISYS_COMPONENT_MODEL_HPP_INCLUDED
8 #define CAFU_GUISYS_COMPONENT_MODEL_HPP_INCLUDED
10 #include "CompBase.hpp"
38 const char*
GetName()
const {
return "Model"; }
53 static int GetNumAnims(lua_State* LuaState);
54 static int SetAnim(lua_State* LuaState);
55 static int GetNumSkins(lua_State* LuaState);
56 static int toString(lua_State* LuaState);
59 static const char* DocClass;
72 VarModelNameT(
const char* Name,
const std::string& Value,
const char* Flags[],
ComponentModelT& Comp);
76 std::string GetExtraMessage()
const {
return m_ExtraMsg; }
79 void Set(
const std::string& v);
85 std::string m_ExtraMsg;
95 VarModelAnimNrT(
const char* Name,
const int& Value,
const char* Flags[],
ComponentModelT& Comp);
99 void Set(
const int& v);
114 VarModelSkinNrT(
const char* Name,
const int& Value,
const char* Flags[],
ComponentModelT& Comp);
127 void FillMemberVars();
128 std::string SetModel(
const std::string& FileName, std::string& Msg);
129 int SetAnimNr(
int AnimNr,
float BlendTime,
bool ForceLoop);
131 VarModelNameT m_ModelName;
132 VarModelAnimNrT m_ModelAnimNr;
133 VarModelSkinNrT m_ModelSkinNr;
134 TypeSys::VarT<Vector3fT> m_ModelPos;
135 TypeSys::VarT<float> m_ModelScale;
136 TypeSys::VarT<Vector3fT> m_ModelAngles;
137 TypeSys::VarT<Vector3fT> m_CameraPos;
ComponentModelT * Clone() const
The virtual copy constructor.
Definition: CompModel.cpp:242
This class represents a native Cafu model.
Definition: Model_cmdl.hpp:45
void OnClockTickEvent(float t)
This method handles clock-tick events.
Definition: CompModel.cpp:319
void UpdateDependencies(WindowT *Window)
This method is called whenever something "external" to this component has changed: ...
Definition: CompModel.cpp:248
This is a "wrapper" around a normal C++ variable.
Definition: SetCompVar.hpp:15
This is the base class for the components that a window is composed/aggregated of.
Definition: CompBase.hpp:51
This class is used for reading data from a StateT instance (deserialization).
Definition: State.hpp:207
~ComponentModelT()
The destructor.
Definition: CompModel.cpp:235
ComponentModelT()
The constructor.
Definition: CompModel.cpp:185
void Render() const
This method implements the graphical output of this component.
Definition: CompModel.cpp:284
This class is used for writing data into a StateT instance (serialization).
Definition: State.hpp:81
This class represents a window of the GuiSys.
Definition: Window.hpp:54
This component adds a 3D model to its window.
Definition: CompModel.hpp:22
static const luaL_Reg MethodsList[]
The list of Lua methods for this class.
Definition: CompModel.hpp:58
const char * GetName() const
Returns the name of this component.
Definition: CompModel.hpp:38
This class describes a specific pose of an associated model.
Definition: AnimPose.hpp:35
Definition: TypeSys.hpp:52
Definition: TypeSys.hpp:57
This class keeps type information (about an entity class that occurs in the game).
Definition: TypeSys.hpp:79
Definition: TypeSys.hpp:68