16 void LoadFromNode(
const XNode* pNode)
override;
17 [[nodiscard]]
auto Copy()
const ->
ActorFrame*
override;
28 auto GetChild(
const std::string& sName) ->
Actor*;
30 [[nodiscard]]
auto GetChildren()
const -> std::vector<Actor*>
35 [[nodiscard]]
auto GetNumChildren()
const ->
int
52 void SortByDrawOrder();
53 void SetDrawByZPosition(
bool b);
57 m_DrawFunction = DrawFunction;
60 void SetUpdateFunction(
const LuaReference& UpdateFunction)
62 m_UpdateFunction = UpdateFunction;
65 [[nodiscard]]
auto GetDrawFunction()
const ->
LuaReference
67 return m_DrawFunction;
70 [[nodiscard]]
virtual auto AutoLoadChildren()
const ->
bool
74 void DeleteChildrenWhenDone(
bool bDelete =
true)
76 m_bDeleteChildren = bDelete;
79 void DeleteAllChildren();
82 void PushSelf(lua_State* L)
override;
83 void PushChildrenTable(lua_State* L);
84 void PushChildTable(lua_State* L,
const std::string& sName);
85 void PlayCommandOnChildren(
const std::string& sCommandName,
87 void PlayCommandOnLeaves(
const std::string& sCommandName,
90 void RunCommandsRecursively(
93 virtual void RunCommandsOnChildren(
96 void RunCommandsOnChildren(
const apActorCommands& cmds,
99 this->RunCommandsOnChildren(*cmds, pParamTable);
101 void RunCommandsOnLeaves(
105 [[nodiscard]]
auto IsFirstUpdate()
const -> bool;
106 void UpdateInternal(
float fDeltaTime)
override;
112 void SetZTestMode(ZTestMode mode)
override;
113 void SetZWrite(
bool b)
override;
114 void FinishTweening()
override;
115 void HurryTweening(
float factor)
override;
117 void SetUpdateFunctionInterval(
float ms)
120 m_fUpdateFInterval = ms;
124 void SetUpdateRate(
float rate)
override
127 m_fUpdateRate = rate;
131 auto GetUpdateRate() ->
float override {
return m_fUpdateRate; }
132 void SetFOV(
float fFOV) { m_fFOV = fFOV; }
134 void SetVanishPoint(
float fX,
float fY)
140 void SetCustomLighting(
bool bCustomLighting)
145 void SetAmbientLightColor(
const RageColor& c) { m_ambientColor = c; }
146 void SetDiffuseLightColor(
const RageColor& c) { m_diffuseColor = c; }
147 void SetSpecularLightColor(
const RageColor& c) { m_specularColor = c; }
148 void SetLightDirection(
const RageVector3& vec) { m_lightDirection = vec; }
150 virtual void SetPropagateCommands(
bool b);
156 void HandleMessage(
const Message& msg)
override;
160 void RunCommands(
const apActorCommands& cmds,
163 this->RunCommands(*cmds, pParamTable);
167 void LoadChildrenFromNode(
const XNode* pNode);
171 bool m_bPropagateCommands;
172 bool m_bDeleteChildren;
173 bool m_bDrawByZPosition;
177 float m_fUpdateFInterval{ 0.016F };
178 float secsSinceLuaUpdateFWasRun{ 0.0F };
203 [[nodiscard]]
auto AutoLoadChildren()
const ->
bool override
an ActorFrame that handles deleting children Actors automatically.
Definition ActorFrame.h:200
A container for other Actors.
Definition ActorFrame.h:8
void MoveToTail(Actor *pActor)
Move a particular actor to the tail.
Definition ActorFrame.cpp:200
void BeginDraw() override
Start the drawing and push the transform on the world matrix stack.
Definition ActorFrame.cpp:222
void EndDraw() override
Pop the transform from the world matrix stack.
Definition ActorFrame.cpp:299
std::vector< Actor * > m_SubActors
The children Actors used by the ActorFrame.
Definition ActorFrame.h:170
void InitState() override
Set up the initial state.
Definition ActorFrame.cpp:84
auto GetTweenTimeLeft() const -> float override
Amount of time until all tweens (and all children's tweens) have stopped:
Definition ActorFrame.cpp:562
void RemoveAllChildren()
Remove all of the children from the frame.
Definition ActorFrame.cpp:194
void MoveToHead(Actor *pActor)
Move a particular actor to the head.
Definition ActorFrame.cpp:211
virtual void AddChild(Actor *pActor)
Add a new child to the ActorFrame.
Definition ActorFrame.cpp:146
void DrawPrimitives() override
Draw the primitives of the Actor.
Definition ActorFrame.cpp:243
virtual void RemoveChild(Actor *pActor)
Remove the specified child from the ActorFrame.
Definition ActorFrame.cpp:165
bool m_bOverrideLighting
A flad to see if an override for the lighting is needed.
Definition ActorFrame.h:188
Base class for all objects that appear on the screen.
Definition Actor.h:77
A self-cleaning Lua reference.
Definition LuaReference.h:10
Definition MessageManager.h:96
Definition RageTypes.h:332
Definition RageTypes.h:172