Menge
Modular Pedestrian Simulation Framework for Research and Development
|
Scene graph node which applies transforms to nodes. More...
#include <Transform.h>
Public Member Functions | |
Transform (GLDagNode *parent=0x0) | |
Constructor. More... | |
void | setTranslation (const Vector3 &vec) |
Set the translation of this node. More... | |
void | addTranslation (const Vector3 &vec) |
Offset the translation of this node. More... | |
void | setScale (const Vector3 &vec) |
Set the scale of this node. More... | |
void | setRotationDeg (const Vector3 &vec) |
Set the orientation of this node. More... | |
void | setRotationRad (const Vector3 &vec) |
Set the orientation of this node. More... | |
void | addRotationDeg (const Vector3 &vec) |
Offsets the orientation of this node. More... | |
void | addRotationRad (const Vector3 &vec) |
Offsets the orientation of this node. More... | |
void | setRotAxisDeg (const Vector3 &vec) |
Set the orientation of this node's rotation axis. More... | |
void | setRotAxisRad (const Vector3 &vec) |
Set the orientation of this node's rotation axis. More... | |
const Vector3 & | translation () const |
Reports the transform's translation value. More... | |
const Vector3 & | rotation () const |
Reports the transform's orientation value. More... | |
const Vector3 & | scale () const |
Reports the transform's scale value. More... | |
void | setDirty () |
Sets the transformation to be dirty. More... | |
void | getMatrix (Matrix4x4 &mat) |
Returns the transform matrix created by this transform node. More... | |
void | getInverseMatrix (Matrix4x4 &mat) |
Writes the transform's inverse matrix created by this transform node. More... | |
void | getWorldMatrix (Matrix4x4 &mat) |
Returns the world matrix of this node; the matrix that transforms points from this node's object space to world space. More... | |
void | getWorldInverseMatrix (Matrix4x4 &mat) |
Returns the world inverse matrix of this node; the matrix that transforms points from world space to this node's object space. More... | |
void | getParentMatrix (Matrix4x4 &mat) |
Returns this node's parent's world matrix. More... | |
void | getParentInverseMatrix (Matrix4x4 &mat) |
Returns this node's parent's world inverse matrix. More... | |
virtual void | drawGL (bool select=false) |
Causes this node's child nodes to draw themselves to the scene, transformed by this node's transformation matrix. More... | |
Public Member Functions inherited from Menge::SceneGraph::GLDagNode | |
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. | |
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... | |
GLDagNode * | getParent () |
Returns a pointer to the node's parent (possibly NULL). More... | |
Protected Attributes | |
XformMatrix | _xform |
The underlyilng transformation matrix associated with this transform node. | |
Protected Attributes inherited from Menge::SceneGraph::GLDagNode | |
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... | |
Scene graph node which applies transforms to nodes.
The Transform uses the XformMatrix to compute the transformation math. See XformMatrix for the details of the math.
Menge::SceneGraph::Transform::Transform | ( | GLDagNode * | parent = 0x0 | ) |
Constructor.
parent | A pointer to the optional parent node in the graph. |
|
inline |
Offsets the orientation of this node.
Rotation is performed using Euler angles and the implict evaluation order of x-, then y-, and finally z-axis rotation. In this case, each axis is summed independently. Generally, because these are Euler angles, this will will not lead to linear interpolation of orientation.
vec | The rotations around the x-, y-, and z-axes, respectively in degrees. |
|
inline |
Offsets the orientation of this node.
Rotation is performed using Euler angles and the implict evaluation order of x-, then y-, and finally z-axis rotation. In this case, each axis is summed independently. Generally, because these are Euler angles, this will will not lead to linear interpolation of orientation.
vec | The rotations around the x-, y-, and z-axes, respectively in radians. |
|
inline |
Offset the translation of this node.
vec | The change to position of this node. |
|
virtual |
Causes this node's child nodes to draw themselves to the scene, transformed by this node's transformation matrix.
select | Determines if the draw call is being performed for the purpose of selection (true) or for visualization (false). |
Reimplemented from Menge::SceneGraph::GLDagNode.
|
inlinevirtual |
Writes the transform's inverse matrix created by this transform node.
mat | This matrix contains the inverse matrix when done. |
Reimplemented from Menge::SceneGraph::GLDagNode.
|
inlinevirtual |
Returns the transform matrix created by this transform node.
mat | This matrix contains the matrix when done. |
Reimplemented from Menge::SceneGraph::GLDagNode.
|
virtual |
Returns this node's parent's world inverse matrix.
mat | This matrix contains the parent's inverse matrix when done. |
Reimplemented from Menge::SceneGraph::GLDagNode.
|
virtual |
Returns this node's parent's world matrix.
mat | This matrix contains the parent matrix when done. |
Reimplemented from Menge::SceneGraph::GLDagNode.
|
virtual |
Returns the world inverse matrix of this node; the matrix that transforms points from world space to this node's object space.
mat | This matrix contains the world inverse matrix when done. |
Reimplemented from Menge::SceneGraph::GLDagNode.
|
virtual |
Returns the world matrix of this node; the matrix that transforms points from this node's object space to world space.
mat | This matrix contains the world matrix when done. |
Reimplemented from Menge::SceneGraph::GLDagNode.
|
inline |
Reports the transform's orientation value.
|
inline |
Reports the transform's scale value.
|
inline |
Sets the transformation to be dirty.
The transform node tries to perform lazy math. Only re-computing matrices due to changes and required computation. Setting it to dirty will force matrix computation next time the matrix is needed.
|
inline |
Set the orientation of this node.
Rotation is performed using Euler angles and the implict evaluation order of x-, then y-, and finally z-axis rotation.
vec | The rotations around the x-, y-, and z-axes, respectively in degrees. |
|
inline |
Set the orientation of this node.
Rotation is performed using Euler angles and the implict evaluation order of x-, then y-, and finally z-axis rotation.
vec | The rotations around the x-, y-, and z-axes, respectively in radians. |
|
inline |
Set the orientation of this node's rotation axis.
Rotation is performed using Euler angles and the implict evaluation order of x-, then y-, and finally z-axis rotation.
vec | The orientation of the rotation axis around the x-, y-, and z-axes, respectively in degrees. |
|
inline |
Set the orientation of this node's rotation axis.
Rotation is performed using Euler angles and the implict evaluation order of x-, then y-, and finally z-axis rotation.
vec | The orientation of the rotation axis around the x-, y-, and z-axes, respectively in radians. |
|
inline |
Set the scale of this node.
vec | The desired scale of this node. |
|
inline |
Set the translation of this node.
vec | The 3D position of the transform. |
|
inline |
Reports the transform's translation value.