Menge
Modular Pedestrian Simulation Framework for Research and Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
Menge::SceneGraph::GLDagNode Class Reference

The node that provides the basis for a "hierarchy" in the scene graph. More...

#include <GLNode.h>

Inheritance diagram for Menge::SceneGraph::GLDagNode:
Menge::SceneGraph::GLNode Menge::SceneGraph::Transform

Public Member Functions

 GLDagNode (GLDagNode *parent=0x0)
 Constructor. More...
 
virtual ~GLDagNode ()
 Virtual destructor.
 
void addChild (GLNode *child)
 Adds a child node to this node. More...
 
virtual void newContext ()
 Performs any work to recreate OpenGL constructs for this node and its children nodes.
 
virtual void drawGL (bool select=false)
 Causes this node's child nodes to draw themselves to the scene. More...
 
virtual void getMatrix (Matrix4x4 &mat)
 Reports the local object transform matrix. More...
 
virtual void getInverseMatrix (Matrix4x4 &mat)
 Reports the local object inverse transform matrix. More...
 
virtual void getWorldMatrix (Matrix4x4 &mat)
 Reports the world object transform matrix. More...
 
virtual void getWorldInverseMatrix (Matrix4x4 &mat)
 Reports the world object inverse transform matrix. More...
 
virtual void getParentMatrix (Matrix4x4 &mat)
 The world matrix of this node's parent matrix (see GLDagNode::getWorldMatrix) More...
 
virtual void getParentInverseMatrix (Matrix4x4 &mat)
 The inverse world matrix of this node's parent matrix (see GLDagNode::getWorldInverseMatrix) More...
 
- Public Member Functions inherited from Menge::SceneGraph::GLNode
 GLNode (GLDagNode *parent=0x0)
 Constructor. More...
 
virtual ~GLNode ()
 Virtual destructor.
 
void setVisible (bool state)
 Sets the visible state of the node. More...
 
GLDagNodegetParent ()
 Returns a pointer to the node's parent (possibly NULL). More...
 

Protected Attributes

GLNode ** _children
 An array of child GLNodes.
 
size_t _childCount
 The number of child nodes this node contains.
 
- Protected Attributes inherited from Menge::SceneGraph::GLNode
GLDagNode_parent
 The GLDagNode that serves as this node's parent.
 
bool _visible
 The visibility state of this node. If visible (true) the node and its children will be drawn into the scene, if invisible (false) it will not be drawn.
 

Additional Inherited Members

- Protected Member Functions inherited from Menge::SceneGraph::GLNode
void setParent (GLDagNode *p)
 Assigns this node to a parent GLDagNode. More...
 

Detailed Description

The node that provides the basis for a "hierarchy" in the scene graph.

The scene graph is, ultimately, not truly a graph. It is a directed acyclic graph, best thought of as a tree with the GLScene at the root and all other nodes inserted into sub-strees below the GLScene.

The GLDagNode serves as the basis for this. It is a GLNode that can accept children, providing the mechanism for creating trees

Constructor & Destructor Documentation

Menge::SceneGraph::GLDagNode::GLDagNode ( GLDagNode parent = 0x0)

Constructor.

Parameters
parentA pointer to the optional parent node in the graph.

Member Function Documentation

void Menge::SceneGraph::GLDagNode::addChild ( GLNode child)

Adds a child node to this node.

Nodes can be linked either by calling GLNode::setParent or GLDagNode::addChild

Parameters
childThe node to add as a child to this node.
void Menge::SceneGraph::GLDagNode::drawGL ( bool  select = false)
virtual

Causes this node's child nodes to draw themselves to the scene.

Parameters
selectDetermines if the draw call is being performed for the purpose of selection (true) or for visualization (false).

Implements Menge::SceneGraph::GLNode.

Reimplemented in Menge::SceneGraph::Transform.

virtual void Menge::SceneGraph::GLDagNode::getInverseMatrix ( Matrix4x4 mat)
inlinevirtual

Reports the local object inverse transform matrix.

By definition, because this node can provide no transformation its inverse transform matrix is the identity matrix.

Parameters
matThe 4x4 matrix into which the identity matrix is set.

Reimplemented in Menge::SceneGraph::Transform.

virtual void Menge::SceneGraph::GLDagNode::getMatrix ( Matrix4x4 mat)
inlinevirtual

Reports the local object transform matrix.

By definition, because this node can provide no transformation its transform matrix is the identity matrix.

Parameters
matThe 4x4 matrix into which the identity matrix is set.

Reimplemented in Menge::SceneGraph::Transform.

void Menge::SceneGraph::GLDagNode::getParentInverseMatrix ( Matrix4x4 mat)
virtual

The inverse world matrix of this node's parent matrix (see GLDagNode::getWorldInverseMatrix)

Parameters
matThe 4x4 matrix into which the result is written. If this node has no parent matrix, the identity matrix is stored.

Reimplemented in Menge::SceneGraph::Transform.

void Menge::SceneGraph::GLDagNode::getParentMatrix ( Matrix4x4 mat)
virtual

The world matrix of this node's parent matrix (see GLDagNode::getWorldMatrix)

Parameters
matThe 4x4 matrix into which the result is written. If this node has no parent matrix, the identity matrix is stored.

Reimplemented in Menge::SceneGraph::Transform.

void Menge::SceneGraph::GLDagNode::getWorldInverseMatrix ( Matrix4x4 mat)
virtual

Reports the world object inverse transform matrix.

This is the concatenation of all transforms experienced by this node and any node in its ancestors up to the GLSCene. This is essentially the transform that transforms elements in world space into this object's space.

Parameters
matThe 4x4 matrix into which the inverse world matrix is set.

Reimplemented in Menge::SceneGraph::Transform.

void Menge::SceneGraph::GLDagNode::getWorldMatrix ( Matrix4x4 mat)
virtual

Reports the world object transform matrix.

This is the concatenation of all transforms experienced by this node and any node in its ancestors up to the GLSCene. This is essentially the transform that transforms elements in this object's space into world space.

Parameters
matThe 4x4 matrix into which the world matrix is set.

Reimplemented in Menge::SceneGraph::Transform.


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