Rasterfarm-SDK
Loading...
Searching...
No Matches
Raster::Node Class Reference

ADT class for applying transforms in a hereditary and directed graph. Each instantiation of this class is in essence a root-node and forms a parent-child relationship whereby the child inherits the parent's transform. More...

#include <node.h>

Inheritance diagram for Raster::Node:
Matrix4f DynamicType Matrix

Public Member Functions

 Node ()
 
virtual ~Node ()
 
virtual void initialize (Scene *pScene, bool addObjectToScene)
 
virtual void addChild (Node *pChild)
 
virtual void removeChild (Node *pChild)
 
virtual Primitive3D::AABoundingBox getAABoundingBox () const
 
bool hasChild (Node *pObject)
 
uint getChildSize ()
 
const NodeListgetChild ()
 
virtual void setParent (Node *pObject)
 
NodegetParent () const
 
Matrix4f createModel () const
 
Vertex3f getLocalPosition ()
 
Vertex3f getGlobalPosition ()
 
void setLocalPosition (Vertex3f point)
 
void setGlobalPosition (Vertex3f point)
 
template<typename T >
void scale (T scale)
 
template<typename T >
void scale (Vector< T, 3 > scale)
 
- Public Member Functions inherited from DynamicType
 DynamicType ()
 
template<class C >
void addType ()
 
TypeID getDerivedTypeId () const
 
template<class C >
const bool isType () const
 
template<class C >
const C * cast () const
 
template<class C >
C * cast ()
 
template<class FROM , class TO >
TO * cast ()
 
template<class FROM , class TO >
const TO * cast () const
 

Static Public Member Functions

static bool deleteSafe (Node *pObject)
 

Protected Attributes

NodeList pChild
 

Detailed Description

ADT class for applying transforms in a hereditary and directed graph. Each instantiation of this class is in essence a root-node and forms a parent-child relationship whereby the child inherits the parent's transform.

Constructor & Destructor Documentation

◆ Node()

Raster::Node::Node ( )

Constructor.

◆ ~Node()

virtual Raster::Node::~Node ( )
virtual

Destructor. Apps need to pass this pointer to Garbage::deleteSafe as rendering occurs on a dedicated thread.

Member Function Documentation

◆ addChild()

virtual void Raster::Node::addChild ( Node * pChild)
virtual

Add an Object to the array of objects transformed-by this node. A child cannot be added a 2nd time.

Parameters
pChildThe child-object to add.
Returns
void.

◆ createModel()

Matrix4f Raster::Node::createModel ( ) const

◆ deleteSafe()

static bool Raster::Node::deleteSafe ( Node * pObject)
inlinestatic

◆ getAABoundingBox()

virtual Primitive3D::AABoundingBox Raster::Node::getAABoundingBox ( ) const
virtual

◆ getChild()

const NodeList & Raster::Node::getChild ( )
inline

◆ getChildSize()

uint Raster::Node::getChildSize ( )
inline

◆ getGlobalPosition()

Vertex3f Raster::Node::getGlobalPosition ( )
Returns
The position of the Node after all inherited transforms are applied.

◆ getLocalPosition()

Vertex3f Raster::Node::getLocalPosition ( )
Returns
The position the Node.

◆ getParent()

Node * Raster::Node::getParent ( ) const
inline

◆ hasChild()

bool Raster::Node::hasChild ( Node * pObject)

◆ initialize()

virtual void Raster::Node::initialize ( Scene * pScene,
bool addObjectToScene )
virtual

◆ removeChild()

virtual void Raster::Node::removeChild ( Node * pChild)
virtual

Remove a child object transformed-by this node.

Parameters
Thechild-object to remove.
Returns
void.

◆ scale() [1/2]

template<typename T >
void Raster::Node::scale ( T scale)
inline

◆ scale() [2/2]

template<typename T >
void Raster::Node::scale ( Vector< T, 3 > scale)
inline

◆ setGlobalPosition()

void Raster::Node::setGlobalPosition ( Vertex3f point)
Parameters
Theposition the Node.

◆ setLocalPosition()

void Raster::Node::setLocalPosition ( Vertex3f point)
Parameters
Theposition the Node.

◆ setParent()

virtual void Raster::Node::setParent ( Node * pObject)
virtual
Parameters
Theparent Node or nullptr to orphan.

Member Data Documentation

◆ pChild

NodeList Raster::Node::pChild
protected

Objects contained within this Graph.


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