Falcon
Public Member Functions | List of all members
Scene::SceneNode Class Reference

#include <SceneGraph.h>

Public Member Functions

 SceneNode ()
 
 SceneNode (Entity *entity)
 
 SceneNode (SceneNode *parent)
 
 SceneNode (SceneNode **childArray, unsigned int size)
 
 ~SceneNode ()
 
void SetUpdateFlag (bool value)
 
void SetParent (SceneNode *node)
 
void SetEntity (Entity *node)
 
SceneNodeGetParent ()
 
EntityGetEntity ()
 
glm::mat4 GetWM ()
 
void SetStatus (Status status)
 
void AddChild (SceneNode *child)
 
void RemoveChild (SceneNode *child)
 
void RemoveChild (unsigned int index)
 
void UpdateEntity (entityVector &vector)
 
SceneNodeGetChildByIndex (unsigned int index)
 
nodeVectorGetChildren ()
 

Detailed Description

Data structure to hold the data and implementations for a Node inside the SceneGraph.

Constructor & Destructor Documentation

◆ SceneNode() [1/4]

Scene::SceneNode::SceneNode ( )

One of the constructors for a Node of the SceneGraph. Creates an Empty Node.

◆ SceneNode() [2/4]

Scene::SceneNode::SceneNode ( Entity entity)

One of the constructors for a Node of the SceneGraph.Creates a Node for the enity provided.

Parameters
[in]Pointerto the entity.

◆ SceneNode() [3/4]

Scene::SceneNode::SceneNode ( SceneNode parent)

One of the constructors for a Node of the SceneGraph. Creates an empty childnode for the parent node provided.

Parameters
[in]Thepointer to the parent node.

◆ SceneNode() [4/4]

Scene::SceneNode::SceneNode ( SceneNode **  childArray,
unsigned int  size 
)

One of the constructors for a Node of the SceneGraph. Creates a node that becomes a praent to all the nodes in the provided node array.

Parameters
[in]Thepointer to array of Nodes.
[in]Thesize of the array.

◆ ~SceneNode()

Scene::SceneNode::~SceneNode ( )

Main Destructor for a SceneNode.

Member Function Documentation

◆ AddChild()

void Scene::SceneNode::AddChild ( SceneNode node)

Function that adds the node provided as a child to this Scene node.

Parameters
[in]Pointerto the node to be added as a child.

◆ GetChildByIndex()

SceneNode* Scene::SceneNode::GetChildByIndex ( unsigned int  index)
inline

◆ GetChildren()

nodeVector& Scene::SceneNode::GetChildren ( )
inline

◆ GetEntity()

Entity* Scene::SceneNode::GetEntity ( )
inline

◆ GetParent()

SceneNode* Scene::SceneNode::GetParent ( )
inline

◆ GetWM()

glm::mat4 Scene::SceneNode::GetWM ( )
inline

◆ RemoveChild() [1/2]

void Scene::SceneNode::RemoveChild ( SceneNode node)

Removes the provided node from the list of child nodes of this scene node.

Parameters
[in]Pointerto the node to be removed as a child.

◆ RemoveChild() [2/2]

void Scene::SceneNode::RemoveChild ( unsigned int  index)

Removes the node at the provided index in the child array as a child.

Parameters
[in]Theindex of the child to be discarded in the child array.

◆ SetEntity()

void Scene::SceneNode::SetEntity ( Entity node)
inline

◆ SetParent()

void Scene::SceneNode::SetParent ( SceneNode node)
inline

◆ SetStatus()

void Scene::SceneNode::SetStatus ( Status  status)

Function that assigns the provided status to the node.

◆ SetUpdateFlag()

void Scene::SceneNode::SetUpdateFlag ( bool  value)
inline

◆ UpdateEntity()

void Scene::SceneNode::UpdateEntity ( entityVector vector)

Function that Updates the node and calls update on each childnode if needed. It primarily checks for any updates in the transformation matrix of its parent node as well as the entity of this node and updates based on that.

Parameters
[in]avector that holds all the entities that were updated during the current loop by the scenegraph and also need to be rendered. Required for processing the octree update.

The documentation for this class was generated from the following files: