Scene Graph Node. Models, Lights and Cameras are derived from this class.
More...
#include <SceneGraphNode.hpp>
|
enum | Type { None,
Model,
Camera,
Light
} |
|
Scene Graph Node. Models, Lights and Cameras are derived from this class.
◆ Type
◆ SceneGraphNode()
SceneGraphNode::SceneGraphNode |
( |
| ) |
|
◆ ~SceneGraphNode()
SceneGraphNode::~SceneGraphNode |
( |
| ) |
|
|
virtual |
◆ AddChild()
- Parameters
-
- Returns
- True if succeeded, false if failed.
◆ Children()
◆ CleanDirties()
void SceneGraphNode::CleanDirties |
( |
| ) |
|
Cleans all dirty flags. Used internally after transform matrices are solved.
◆ ContainsChild()
bool SceneGraphNode::ContainsChild |
( |
const SceneGraphNode * |
node | ) |
const |
|
virtual |
- Parameters
-
node | Node that's searched in this node and its children. |
- Returns
- true if this node or one of its children is node.
◆ FindFirstChildWithName()
void SceneGraphNode::FindFirstChildWithName |
( |
const char * |
name, |
|
|
SceneGraphNode ** |
outNode |
|
) |
| |
|
virtual |
- Parameters
-
name | Node's name that's searched in this node and its children. |
outNode | First found node that matches name (case-sensitive) or unset if not found. |
◆ GetLayerMask()
virtual unsigned SceneGraphNode::GetLayerMask |
( |
| ) |
const |
|
inlinevirtual |
◆ GetName()
virtual std::string SceneGraphNode::GetName |
( |
| ) |
const |
|
inlinevirtual |
◆ GetPosition()
virtual Vec3 SceneGraphNode::GetPosition |
( |
| ) |
const |
|
inlinevirtual |
◆ GetRotation()
virtual Quaternion SceneGraphNode::GetRotation |
( |
| ) |
const |
|
inlinevirtual |
◆ GetScale()
virtual float SceneGraphNode::GetScale |
( |
| ) |
const |
|
inlinevirtual |
◆ GetType()
virtual Type SceneGraphNode::GetType |
( |
| ) |
const |
|
inlinevirtual |
◆ IsDirty()
bool SceneGraphNode::IsDirty |
( |
| ) |
const |
|
inline |
Used internally during rendering to determine if the transform has changed since the beginning of Renderer::Draw( scene ). Used to recalculate childrens's AABBs.
- Returns
- True, if the transform or some of its parent has changed since the beginning of Renderer::Draw( scene )
◆ Parent()
◆ RegisterScene()
void SceneGraphNode::RegisterScene |
( |
Scene * |
scene | ) |
|
|
static |
Registers a Scene for listening node additions. Called automatically when creating scene from a DLL, but on iOS you must call this because it doesn't use a DLL.
- Parameters
-
FIXME: This is a serious violation of good OO design: base classes should not know about their derived classes.
◆ Root()
◆ SetLayerMask()
virtual void SceneGraphNode::SetLayerMask |
( |
unsigned |
mask | ) |
|
|
inlinevirtual |
Sets layer mask. Used to select which cameras should render which models. Does not affect lights.
- Parameters
-
◆ SetName()
virtual void SceneGraphNode::SetName |
( |
const std::string & |
newName | ) |
|
|
inlinevirtual |
◆ SetPosition()
virtual void SceneGraphNode::SetPosition |
( |
const Vec3 & |
aPosition | ) |
|
|
inlinevirtual |
- Parameters
-
aPosition | Absolute position. |
Reimplemented in Light.
◆ SetRotation()
virtual void SceneGraphNode::SetRotation |
( |
const Quaternion & |
aRotation | ) |
|
|
inlinevirtual |
- Parameters
-
aRotation | Absolute rotation. |
◆ SetScale()
virtual void SceneGraphNode::SetScale |
( |
float |
aScale | ) |
|
|
inlinevirtual |
◆ SolveMatrices()
void SceneGraphNode::SolveMatrices |
( |
| ) |
|
|
virtual |
Traverses the graph and creates transformation matrices.
◆ UnregisterScene()
void SceneGraphNode::UnregisterScene |
( |
| ) |
|
|
static |
Unregisters a Scene from node addition listening.
◆ children
◆ dirtyTransform
bool SceneGraphNode::dirtyTransform = true |
|
protected |
Needed to update children's transform.
◆ layerMask
unsigned SceneGraphNode::layerMask = 0xFFFFFFFF |
|
protected |
Layer mask. Affects Camera-Model interaction.
◆ modelMatrix
Created from position, rotation and parent hierarchy starting from Scene's root node.
◆ name
std::string SceneGraphNode::name |
|
protected |
Needed currently only in Editor.
◆ parent
◆ position
Vec3 SceneGraphNode::position |
|
protected |
◆ rotation
◆ scale
float SceneGraphNode::scale |
|
protected |
◆ type
Type SceneGraphNode::type |
|
protected |
The documentation for this class was generated from the following files:
- /home/glaze/Documents/src/Aether3D_2013/Include/SceneGraphNode.hpp
- /home/glaze/Documents/src/Aether3D_2013/Include/SceneGraphNode.cpp