RigsofRods
Soft-body Physics Simulation
|
Class representing a node in the scene graph. More...
#include <AngelOgre_OgreSceneNode.h>
Public Member Functions | |
void | attachObject (MovableObject@ obj) |
Adds an instance of a scene object to this node. More... | |
MovableObject | getAttachedObject (const string &name) |
Retrieves a pointer to an attached object. More... | |
MovableObject | detachObject (uint16 index) |
Detaches the indexed object from this scene node. More... | |
void | detachObject (MovableObject@ obj) |
Detaches an object by pointer. More... | |
MovableObject | detachObject (const string &name) |
Detaches the named object from this node and returns a pointer to it. More... | |
void | detachAllObjects (void) |
Detaches all objects attached to this node. More... | |
bool | isInSceneGraph (void) const |
Determines whether this node is in the scene graph, i.e. More... | |
MovableObjectArray | getAttachedObjects () |
The MovableObjects attached to this node. More... | |
SceneManager | getCreator (void) const |
Gets the creator of this scene node. More... | |
void | removeAndDestroyChild (const string &name) |
This method removes and destroys the named child and all of its children. More... | |
void | removeAndDestroyChild (uint16 index) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
void | removeAndDestroyChild (SceneNode@ child) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
void | removeAndDestroyAllChildren (void) |
Removes and destroys all children of this node. More... | |
void | showBoundingBox (bool bShow) |
Allows the showing of the node's bounding box. More... | |
void | hideBoundingBox (bool bHide) |
Allows the overriding of the node's bounding box over the SceneManager's bounding box setting. More... | |
bool | getShowBoundingBox () const |
This allows scene managers to determine if the node's bounding box should be added to the rendering queue. More... | |
SceneNode | createChildSceneNode (const vector3 &translate=vector3(0.f, 0.f, 0.f), const Quaternion &rotate=quaternion()) |
Creates an unnamed new SceneNode as a child of this node. More... | |
SceneNode | createChildSceneNode (const string &name, const vector3 &translate=vector3(0.f, 0.f, 0.f), const Quaternion &rotate=quaternion()) |
Creates a new named SceneNode as a child of this node. More... | |
void | setFixedYawAxis (bool useFixed, const vector3 &fixedAxis=vector3(0.f, 1.f, 0.f)) |
Tells the node whether to yaw around it's own local Y axis or a fixed axis of choice. More... | |
void | yaw (const Radian &angle, TransformSpace relativeTo=TS_LOCAL) |
Rotate the node around the Y-axis. More... | |
void | setDirection (const vector3 &vec, TransformSpace relativeTo=TS_LOCAL, const vector3 &localDirectionVector=vector3(0.f, 0.f, -1.f)) |
Sets the node's direction vector ie it's local -z. More... | |
void | lookAt (const vector3 &targetPoint, TransformSpace relativeTo, const vector3 &localDirectionVector=vector3(0.f, 0.f, -1.f)) |
Points the local -Z direction of this node at a point in space. More... | |
void | setAutoTracking (bool enabled, SceneNode@ const target=0, const vector3 &localDirectionVector=vector3(0.f, 0.f, -1.f), const vector3 &offset=vector3(0.f, 0.f, 0.f)) |
Enables / disables automatic tracking of another SceneNode. More... | |
SceneNode | getAutoTrackTarget (void) |
Get the auto tracking target for this node, if any. More... | |
const vector3 & | getAutoTrackOffset (void) |
Get the auto tracking offset for this node, if the node is auto tracking. More... | |
const vector3 & | getAutoTrackLocalDirection (void) |
Get the auto tracking local direction for this node, if it is auto tracking. More... | |
SceneNode | getParentSceneNode (void) |
Gets the parent of this SceneNode. More... | |
void | setVisible (bool visible, bool cascade=true) |
Makes all objects attached to this node become visible / invisible. More... | |
void | flipVisibility (bool cascade=true) |
Inverts the visibility of all objects attached to this node. More... | |
void | setDebugDisplayEnabled (bool enabled, bool cascade=true) |
Tells all objects attached to this node whether to display their debug information or not. More... | |
Public Member Functions inherited from AngelOgre::Node | |
const vector3 & | getPosition () const |
void | setPosition (const vector3 &in) |
const vector3 & | getScale () const |
void | setScale (const vector3 &in) |
const string & | getName () const |
Node | getParent () |
string | __getUniqueName () const |
A Rigs of Rods extension - generates unique name as "{name} ({mem_address})". More... | |
ChildNodeArray | getChildren () |
Not const because we don't want all elements to be const (this isn't the case with raw pointers in C++). More... | |
Class representing a node in the scene graph.
Definition at line 20 of file AngelOgre_OgreSceneNode.h.
void AngelOgre::SceneNode::attachObject | ( | MovableObject@ | obj | ) |
Adds an instance of a scene object to this node.
SceneNode AngelOgre::SceneNode::createChildSceneNode | ( | const string & | name, |
const vector3 & | translate = vector3(0.f, 0.f, 0.f) , |
||
const Quaternion & | rotate = quaternion() |
||
) |
Creates a new named SceneNode as a child of this node.
translate | Initial translation offset of child relative to parent |
rotate | Initial rotation relative to parent |
SceneNode AngelOgre::SceneNode::createChildSceneNode | ( | const vector3 & | translate = vector3(0.f, 0.f, 0.f) , |
const Quaternion & | rotate = quaternion() |
||
) |
Creates an unnamed new SceneNode as a child of this node.
translate | Initial translation offset of child relative to parent |
rotate | Initial rotation relative to parent |
void AngelOgre::SceneNode::detachAllObjects | ( | void | ) |
Detaches all objects attached to this node.
MovableObject AngelOgre::SceneNode::detachObject | ( | const string & | name | ) |
Detaches the named object from this node and returns a pointer to it.
void AngelOgre::SceneNode::detachObject | ( | MovableObject@ | obj | ) |
Detaches an object by pointer.
MovableObject AngelOgre::SceneNode::detachObject | ( | uint16 | index | ) |
Detaches the indexed object from this scene node.
void AngelOgre::SceneNode::flipVisibility | ( | bool | cascade = true | ) |
Inverts the visibility of all objects attached to this node.
cascade | If true, this setting cascades into child nodes too. |
MovableObject AngelOgre::SceneNode::getAttachedObject | ( | const string & | name | ) |
Retrieves a pointer to an attached object.
MovableObjectArray AngelOgre::SceneNode::getAttachedObjects | ( | ) |
The MovableObjects attached to this node.
This is a much faster way to go through all the objects attached to the node than using getAttachedObject.
const vector3& AngelOgre::SceneNode::getAutoTrackLocalDirection | ( | void | ) |
Get the auto tracking local direction for this node, if it is auto tracking.
const vector3& AngelOgre::SceneNode::getAutoTrackOffset | ( | void | ) |
Get the auto tracking offset for this node, if the node is auto tracking.
SceneNode AngelOgre::SceneNode::getAutoTrackTarget | ( | void | ) |
Get the auto tracking target for this node, if any.
SceneManager AngelOgre::SceneNode::getCreator | ( | void | ) | const |
Gets the creator of this scene node.
bool AngelOgre::SceneNode::getShowBoundingBox | ( | ) | const |
This allows scene managers to determine if the node's bounding box should be added to the rendering queue.
void AngelOgre::SceneNode::hideBoundingBox | ( | bool | bHide | ) |
Allows the overriding of the node's bounding box over the SceneManager's bounding box setting.
bool AngelOgre::SceneNode::isInSceneGraph | ( | void | ) | const |
Determines whether this node is in the scene graph, i.e.
whether it's ultimate ancestor is the root scene node.
void AngelOgre::SceneNode::lookAt | ( | const vector3 & | targetPoint, |
TransformSpace | relativeTo, | ||
const vector3 & | localDirectionVector = vector3(0.f, 0.f, -1.f) |
||
) |
Points the local -Z direction of this node at a point in space.
targetPoint | A vector specifying the look at point. |
relativeTo | The space in which the point resides |
localDirectionVector | The vector which normally describes the natural direction of the node, usually -Z |
void AngelOgre::SceneNode::removeAndDestroyAllChildren | ( | void | ) |
Removes and destroys all children of this node.
void AngelOgre::SceneNode::removeAndDestroyChild | ( | const string & | name | ) |
This method removes and destroys the named child and all of its children.
void AngelOgre::SceneNode::removeAndDestroyChild | ( | SceneNode@ | child | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void AngelOgre::SceneNode::removeAndDestroyChild | ( | uint16 | index | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void AngelOgre::SceneNode::setAutoTracking | ( | bool | enabled, |
SceneNode@ const | target = 0 , |
||
const vector3 & | localDirectionVector = vector3(0.f, 0.f, -1.f) , |
||
const vector3 & | offset = vector3(0.f, 0.f, 0.f) |
||
) |
Enables / disables automatic tracking of another SceneNode.
enabled | If true, tracking will be enabled and the next parameter cannot be null. If false tracking will be disabled and the current orientation will be maintained. |
target | Pointer to the SceneNode to track. Make sure you don't delete this SceneNode before turning off tracking (e.g. SceneManager::clearScene will delete it so be careful of this). Can be null if and only if the enabled param is false. |
localDirectionVector | The local vector considered to be the usual 'direction' of the node; normally the local -Z but can be another direction. |
offset | If supplied, this is the target point in local space of the target node instead of the origin of the target node. Good for fine tuning the look at point. |
void AngelOgre::SceneNode::setDebugDisplayEnabled | ( | bool | enabled, |
bool | cascade = true |
||
) |
Tells all objects attached to this node whether to display their debug information or not.
enabled | Whether the objects are to display debug info or not |
cascade | If true, this setting cascades into child nodes too. |
void AngelOgre::SceneNode::setDirection | ( | const vector3 & | vec, |
TransformSpace | relativeTo = TS_LOCAL , |
||
const vector3 & | localDirectionVector = vector3(0.f, 0.f, -1.f) |
||
) |
Sets the node's direction vector ie it's local -z.
vec | The components of the direction vector |
relativeTo | The space in which this direction vector is expressed |
localDirectionVector | The vector which normally describes the natural direction of the node, usually -Z |
void AngelOgre::SceneNode::setFixedYawAxis | ( | bool | useFixed, |
const vector3 & | fixedAxis = vector3(0.f, 1.f, 0.f) |
||
) |
Tells the node whether to yaw around it's own local Y axis or a fixed axis of choice.
useFixed | If true, the axis passed in the second parameter will always be the yaw axis no matter what the node orientation. If false, the node returns to it's default behaviour. |
fixedAxis | The axis to use if the first parameter is true. |
void AngelOgre::SceneNode::setVisible | ( | bool | visible, |
bool | cascade = true |
||
) |
Makes all objects attached to this node become visible / invisible.
visible | Whether the objects are to be made visible or invisible |
cascade | If true, this setting cascades into child nodes too. |
void AngelOgre::SceneNode::showBoundingBox | ( | bool | bShow | ) |
Allows the showing of the node's bounding box.
void AngelOgre::SceneNode::yaw | ( | const Radian & | angle, |
TransformSpace | relativeTo = TS_LOCAL |
||
) |
Rotate the node around the Y-axis.