|
Aether3D
Game Engine
|
1 #ifndef SCENEGRAPHNODE_H
2 #define SCENEGRAPHNODE_H
6 # define INCLUDE_LIST_H
8 #ifndef INCLUDE_STRING_H
10 # define INCLUDE_STRING_H
13 # include "Matrix.hpp"
19 # include "Quaternion.hpp"
44 static void RegisterScene(
Scene* scene );
49 static void UnregisterScene();
73 virtual void FindFirstChildWithName(
const char* name,
SceneGraphNode** outNode );
84 virtual void SetName(
const std::string& newName ) { name = newName; }
87 virtual void SetPosition(
const Vec3& aPosition ) { position = aPosition; dirtyTransform =
true; }
96 virtual void SetScale(
float aScale ) { scale = aScale; dirtyTransform =
true; }
99 virtual float GetScale()
const {
return scale; }
102 virtual void SolveMatrices();
108 virtual std::string
GetName()
const {
return name; }
117 virtual std::list< SceneGraphNode* >&
Children() {
return children; }
140 bool outDirty = dirtyTransform;
157 testParent = testParent->
parent;
181 bool dirtyTransform =
true;
183 unsigned layerMask = 0xFFFFFFFF;
192 void FindChild(
const SceneGraphNode* node,
bool& outFound )
const;
196 static Scene* sScene;
virtual SceneGraphNode * Parent()
Definition: SceneGraphNode.hpp:105
Stores scene in a scene graph.
Definition: Scene.hpp:28
std::list< SceneGraphNode * > children
Definition: SceneGraphNode.hpp:126
virtual void SetScale(float aScale)
Definition: SceneGraphNode.hpp:96
Perspective or orthographic camera.
Definition: Camera.hpp:12
virtual void SetPosition(const Vec3 &aPosition)
Definition: SceneGraphNode.hpp:87
virtual unsigned GetLayerMask() const
Definition: SceneGraphNode.hpp:114
virtual Type GetType() const
Definition: SceneGraphNode.hpp:111
virtual std::string GetName() const
Definition: SceneGraphNode.hpp:108
Matrix44 modelMatrix
Definition: SceneGraphNode.hpp:165
Light.
Definition: Light.hpp:11
bool dirtyTransform
Definition: SceneGraphNode.hpp:181
3-component vector.
Definition: Vec3.hpp:22
float scale
Definition: SceneGraphNode.hpp:171
std::string name
Definition: SceneGraphNode.hpp:179
virtual void SetName(const std::string &newName)
Definition: SceneGraphNode.hpp:84
virtual Vec3 GetPosition() const
Definition: SceneGraphNode.hpp:120
virtual void SetLayerMask(unsigned mask)
Definition: SceneGraphNode.hpp:81
virtual Quaternion GetRotation() const
Definition: SceneGraphNode.hpp:93
virtual std::list< SceneGraphNode * > & Children()
Definition: SceneGraphNode.hpp:117
Vec3 position
Definition: SceneGraphNode.hpp:173
Type
Definition: SceneGraphNode.hpp:33
Stores an orientation.
Definition: Quaternion.hpp:17
Contains meshes loaded from Aether3D's own .ae3d file format.
Definition: Model.hpp:21
Row-major 4x4 Matrix.
Definition: Matrix.hpp:20
virtual void SetRotation(const Quaternion &aRotation)
Definition: SceneGraphNode.hpp:90
Quaternion rotation
Definition: SceneGraphNode.hpp:177
Scene Graph Node. Models, Lights and Cameras are derived from this class.
Definition: SceneGraphNode.hpp:28
virtual float GetScale() const
Definition: SceneGraphNode.hpp:99
SceneGraphNode * parent
Definition: SceneGraphNode.hpp:175
Type type
Definition: SceneGraphNode.hpp:169
bool IsDirty() const
Definition: SceneGraphNode.hpp:138