7 #ifndef CAFU_MODELEDITOR_MODEL_DOCUMENT_HPP_INCLUDED
8 #define CAFU_MODELEDITOR_MODEL_DOCUMENT_HPP_INCLUDED
11 #include "ElementTypes.hpp"
12 #include "Math3D/BoundingBox.hpp"
13 #include "Math3D/Vector3.hpp"
14 #include "Models/AnimPose.hpp"
15 #include "Templates/Array.hpp"
24 namespace cf {
class UniScriptStateT; }
25 namespace cf {
namespace GuiSys {
class GuiImplT; } }
38 LightSourceT(
bool IsOn_,
bool CastShadows_,
const Vector3fT& Pos_,
float Radius_,
const wxColour& Color_)
67 const CafuModelT* GetSubmodel()
const {
return m_Submodel; }
88 const CafuModelT* GetModel()
const {
return m_Model; }
89 const ArrayT<unsigned int>& GetSelection(ModelElementTypeT Type)
const { wxASSERT(Type<6);
return m_Selection[Type]; }
90 const BoundingBox3fT& GetSequenceBB()
const {
return m_SequenceBB; }
94 const AnimStateT& GetAnimState()
const {
return m_AnimState; }
97 const MapBrushT* GetGround()
const {
return m_Ground; }
100 const GameConfigT* GetGameConfig()
const {
return m_GameConfig; }
104 AnimStateT& GetAnimState() {
return m_AnimState; }
105 void LoadSubmodel(
const wxString& FileName);
106 void UnloadSubmodel(
unsigned long SubmodelNr);
107 MapBrushT* GetGround() {
return m_Ground; }
108 GameConfigT* GetGameConfig() {
return m_GameConfig; }
112 void AdvanceTime(
float Time);
113 void SetAnimSpeed(
float NewSpeed);
121 static CafuModelT* LoadModel(
const wxString& FileName);
126 AnimStateT m_AnimState;
This class represents a native Cafu model.
Definition: Model_cmdl.hpp:45
wxString GetSelSkinString() const
Returns a string representation for the currently selected skin.
Definition: ModelDocument.cpp:161
AnimPoseT Pose
The current pose of the model, as defined by sequence and frame number.
Definition: ModelDocument.hpp:55
ModelDocumentT(GameConfigT *GameConfig, const wxString &FileName)
The constructor.
Definition: ModelDocument.cpp:61
This class implements a camera.
Definition: Camera.hpp:17
float Radius
The light sources radius in world space.
Definition: ModelDocument.hpp:44
ArrayT< unsigned int > GetSelection_PrevAnimSequ() const
Returns the suggested selection set for activating the previous animation sequence.
Definition: ModelDocument.cpp:258
float Speed
The speed (relative to clock time) with which the animation is advanced, usually 0 for stop or 1 for ...
Definition: ModelDocument.hpp:56
IntrusivePtrT< AnimExprStandardT > LastStdAE
The last (most recent) "standard" anim expression that we set in the anim pose.
Definition: ModelDocument.hpp:54
wxColour Color
The light sources color (used for both the diffuse and specular component).
Definition: ModelDocument.hpp:45
Definition: MapBrush.hpp:15
Vector3fT Pos
The light sources position in world space.
Definition: ModelDocument.hpp:43
Definition: ObserverPattern.hpp:104
This file provides the classes for the Observer pattern as described in the book by the GoF...
Definition: ModelDocument.hpp:60
~ModelDocumentT()
The destructor.
Definition: ModelDocument.cpp:128
Definition: EditorMaterial.hpp:21
bool IsOn
Whether this light source is currently on / active / being used.
Definition: ModelDocument.hpp:41
The class describes the settings for a game/MOD.
Definition: GameConfig.hpp:32
Definition: ModelDocument.hpp:34
bool Loop
When playing the sequence, loop automatically when its end has been reached?
Definition: ModelDocument.hpp:57
Definition: ModelDocument.hpp:48
bool CastShadows
Whether this light source casts shadows.
Definition: ModelDocument.hpp:42
int GetSelSkinNr() const
Return the index number of the currently selected skin, or -1 when no skin (that is, the default skin) is selected.
Definition: ModelDocument.cpp:155
ArrayT< unsigned int > GetSelection_NextAnimSequ() const
Returns the suggested selection set for activating the next animation sequence.
Definition: ModelDocument.cpp:246
This class describes a specific pose of an associated model.
Definition: AnimPose.hpp:35
This class represents the state of a script: the underlying Lua state, pending coroutines, metatables for C++ class hierarchies, etc.
Definition: UniScriptState.hpp:214
Definition: ModelDocument.hpp:30
This class represents an axis-aligned bounding-box ("AABB") in 3-dimensional space.
Definition: BoundingBox.hpp:23