DigitalSpaces::DIOGRESceneNode Struct Reference
[Ogre]

#include <OGREInterfaces.h>

Inherits DigitalSpaces::DIObjectBase.


Public Member Functions

void AttachObject (DIOGREMovableObject *obj)
 Adds an instance of a scene object to this node.
unsigned short NumAttachedObjects (void)
 Reports the number of objects attached to this node.
DIOGREMovableObjectGetAttachedObject (unsigned short index)
 Retrieves a pointer to an attached object.
DIOGREMovableObjectGetAttachedObject (const char *name)
 Retrieves a pointer to an attached object.
DIOGREMovableObjectDetachObject (unsigned short index)
 Detaches the indexed object from this scene node.
void DetachObject (DIOGREMovableObject *obj)
 Detaches an object by pointer.
DIOGREMovableObjectDetachObject (const char *name)
 Detaches the named object from this node and returns a pointer to it.
void DetachAllObjects (void)
 Detaches all objects attached to this node.
bool IsInSceneGraph (void)
 Determines whether this node is in the scene graph, ie whether it's ulitimate ancestor is the root scene node.
DIOGRESceneManagerGetCreator (void)
 Retrieves an iterator which can be used to efficiently step through the objects attached to this node.
void RemoveAndDestroyChild (const char *name)
 This method removes and destroys the named child and all of its children.
void RemoveAndDestroyChild (unsigned short index)
 This method removes and destroys the child and all of its children.
void RemoveAndDestroyAllChildren (void)
 Removes and destroys all children of this node.
void ShowBoundingBox (bool bShow)
 Allows the showing of the node's bounding box.
bool GetShowBoundingBox ()
 This allows scene managers to determine if the node's bounding box should be added to the rendering queue.
DIOGRESceneNodeCreateChildSceneNode (void)
 Creates an unnamed new SceneNode as a child of this node.
DIOGRESceneNodeCreateChildSceneNode (in_Vector3f *translate, in_Quaternionf *rotate)
DIOGRESceneNodeCreateChildSceneNode (const char *name)
 Creates a new named SceneNode as a child of this node.
DIOGRESceneNodeCreateChildSceneNode (const char *name, in_Vector3f *translate, in_Quaternionf *rotate)
void SetFixedYawAxis (bool useFixed)
 Allows retrieval of the nearest lights to the centre of this SceneNode.
void SetFixedYawAxis (bool useFixed, in_Vector3f *fixedAxis)
void YawRadian (const float angle)
 Rotate the node around the Y-axis.
void YawRadian (const float angle, TransformSpace relativeTo)
void YawDegree (const float angle)
void YawDegree (const float angle, TransformSpace relativeTo)
void SetDirection (float x, float y, float z)
 Sets the node's direction vector ie it's local -z.
void SetDirection (float x, float y, float z, TransformSpace relativeTo, in_Vector3f *localDirectionVector)
void SetDirection (in_Vector3f *vec)
 Sets the node's direction vector ie it's local -z.
void SetDirection (in_Vector3f *vec, TransformSpace relativeTo, in_Vector3f *localDirectionVector)
void LookAt (in_Vector3f *targetPoint, TransformSpace relativeTo)
 Points the local -Z direction of this node at a point in space.
void LookAt (in_Vector3f *targetPoint, TransformSpace relativeTo, in_Vector3f *localDirectionVector)
void SetAutoTracking (bool enabled)
 Enables / disables automatic tracking of another SceneNode.
void SetAutoTracking (bool enabled, DIOGRESceneNode *target, in_Vector3f *localDirectionVector, in_Vector3f *offset)
DIOGRESceneNodeGetAutoTrackTarget (void)
 Get the auto tracking target for this node, if any.
void GetAutoTrackOffset (out_Vector3f *vec)
 Get the auto tracking offset for this node, if the node is auto tracking.
void GetAutoTrackLocalDirection (out_Vector3f *vec)
 Get the auto tracking local direction for this node, if it is auto tracking.
DIOGRESceneNodeGetParentSceneNode (void)
 Gets the parent of this SceneNode.
void SetVisible (bool visible)
 Makes all objects attached to this node become visible / invisble.
void SetVisible (bool visible, bool cascade)
void FlipVisibility (void)
 Inverts the visibility of all objects attached to this node.
void FlipVisibility (bool cascade)

Member Function Documentation

void DigitalSpaces::DIOGRESceneNode::AttachObject ( DIOGREMovableObject obj  ) 

Adds an instance of a scene object to this node.

Remarks:
Scene objects can include Entity objects, Camera objects, Light objects, ParticleSystem objects etc. Anything that subclasses from DIOGREMovableObject.

unsigned short DigitalSpaces::DIOGRESceneNode::NumAttachedObjects ( void   ) 

Reports the number of objects attached to this node.

DIOGREMovableObject* DigitalSpaces::DIOGRESceneNode::GetAttachedObject ( unsigned short  index  ) 

Retrieves a pointer to an attached object.

Remarks:
Retrieves by index, see alternate version to retrieve by name. The index of an object may change as other objects are added / removed.

DIOGREMovableObject* DigitalSpaces::DIOGRESceneNode::GetAttachedObject ( const char *  name  ) 

Retrieves a pointer to an attached object.

Remarks:
Retrieves by object name, see alternate version to retrieve by index.

DIOGREMovableObject* DigitalSpaces::DIOGRESceneNode::DetachObject ( unsigned short  index  ) 

Detaches the indexed object from this scene node.

Remarks:
Detaches by index, see the alternate version to detach by name. Object indexes may change as other objects are added / removed.

void DigitalSpaces::DIOGRESceneNode::DetachObject ( DIOGREMovableObject obj  ) 

Detaches an object by pointer.

DIOGREMovableObject* DigitalSpaces::DIOGRESceneNode::DetachObject ( const char *  name  ) 

Detaches the named object from this node and returns a pointer to it.

void DigitalSpaces::DIOGRESceneNode::DetachAllObjects ( void   ) 

Detaches all objects attached to this node.

bool DigitalSpaces::DIOGRESceneNode::IsInSceneGraph ( void   ) 

Determines whether this node is in the scene graph, ie whether it's ulitimate ancestor is the root scene node.

DIOGRESceneManager* DigitalSpaces::DIOGRESceneNode::GetCreator ( void   ) 

Retrieves an iterator which can be used to efficiently step through the objects attached to this node.

Remarks:
This is a much faster way to go through all the objects attached to the node than using getAttachedObject. But the iterator returned is only valid until a change is made to the collection (ie an addition or removal) so treat the returned iterator as transient, and don't add / remove items as you go through the iterator, save changes until the end, or retrieve a new iterator after making the change. Making changes to the object returned through the iterator is OK though. Retrieves an iterator which can be used to efficiently step through the objects attached to this node.

This is a much faster way to go through all the objects attached to the node than using getAttachedObject. But the iterator returned is only valid until a change is made to the collection (ie an addition or removal) so treat the returned iterator as transient, and don't add / remove items as you go through the iterator, save changes until the end, or retrieve a new iterator after making the change. Making changes to the object returned through the iterator is OK though. Gets the creator of this scene node.

This method returns the SceneManager which created this node. This can be useful for destroying this node.

void DigitalSpaces::DIOGRESceneNode::RemoveAndDestroyChild ( const char *  name  ) 

This method removes and destroys the named child and all of its children.

Remarks:
Unlike removeChild, which removes a single named child from this node but does not destroy it, this method destroys the child and all of it's children.
Use this if you wish to recursively destroy a node as well as detaching it from it's parent. Note that any objects attached to the nodes will be detached but will not themselves be destroyed.

void DigitalSpaces::DIOGRESceneNode::RemoveAndDestroyChild ( unsigned short  index  ) 

This method removes and destroys the child and all of its children.

Remarks:
Unlike removeChild, which removes a single named child from this node but does not destroy it, this method destroys the child and all of it's children.
Use this if you wish to recursively destroy a node as well as detaching it from it's parent. Note that any objects attached to the nodes will be detached but will not themselves be destroyed.

void DigitalSpaces::DIOGRESceneNode::RemoveAndDestroyAllChildren ( void   ) 

Removes and destroys all children of this node.

Remarks:
Use this to destroy all child nodes of this node and remove them from the scene graph. Note that all objects attached to this node will be detached but will not be destroyed.

void DigitalSpaces::DIOGRESceneNode::ShowBoundingBox ( bool  bShow  ) 

Allows the showing of the node's bounding box.

Remarks:
Use this to show or hide the bounding box of the node.

bool DigitalSpaces::DIOGRESceneNode::GetShowBoundingBox (  ) 

This allows scene managers to determine if the node's bounding box should be added to the rendering queue.

Remarks:
Scene Managers that implement their own _findVisibleObjects will have to check this flag and then use _addBoundingBoxToQueue to add the bounding box wireframe.

DIOGRESceneNode* DigitalSpaces::DIOGRESceneNode::CreateChildSceneNode ( void   ) 

Creates an unnamed new SceneNode as a child of this node.

Parameters:
translate Initial translation offset of child relative to parent
rotate Initial rotation relative to parent

DIOGRESceneNode* DigitalSpaces::DIOGRESceneNode::CreateChildSceneNode ( in_Vector3f translate,
in_Quaternionf rotate 
)

DIOGRESceneNode* DigitalSpaces::DIOGRESceneNode::CreateChildSceneNode ( const char *  name  ) 

Creates a new named SceneNode as a child of this node.

Remarks:
This creates a child node with a given name, which allows you to look the node up from the parent which holds this collection of nodes.
Parameters:
translate Initial translation offset of child relative to parent
rotate Initial rotation relative to parent

DIOGRESceneNode* DigitalSpaces::DIOGRESceneNode::CreateChildSceneNode ( const char *  name,
in_Vector3f translate,
in_Quaternionf rotate 
)

void DigitalSpaces::DIOGRESceneNode::SetFixedYawAxis ( bool  useFixed  ) 

Allows retrieval of the nearest lights to the centre of this SceneNode.

Remarks:
This method allows a list of lights, ordered by proximity to the centre of this SceneNode, to be retrieved. Multiple access to this method when neither the node nor the lights have moved will result in the same list being returned without recalculation. Can be useful when implementing Renderable::getLights.
Parameters:
radius Optional parameter to specify lights intersecting a given radius of this SceneNode's centre. Tells the node whether to yaw around it's own local Y axis or a fixed axis of choice.
Remarks:
This method allows you to change the yaw behaviour of the node - by default, it yaws around it's own local Y axis when told to yaw with TS_LOCAL, this makes it yaw around a fixed axis. You only really need this when you're using auto tracking (see setAutoTracking, because when you're manually rotating a node you can specify the TransformSpace in which you wish to work anyway.
Parameters:
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 DigitalSpaces::DIOGRESceneNode::SetFixedYawAxis ( bool  useFixed,
in_Vector3f fixedAxis 
)

void DigitalSpaces::DIOGRESceneNode::YawRadian ( const float  angle  ) 

Rotate the node around the Y-axis.

void DigitalSpaces::DIOGRESceneNode::YawRadian ( const float  angle,
TransformSpace  relativeTo 
)

void DigitalSpaces::DIOGRESceneNode::YawDegree ( const float  angle  ) 

void DigitalSpaces::DIOGRESceneNode::YawDegree ( const float  angle,
TransformSpace  relativeTo 
)

void DigitalSpaces::DIOGRESceneNode::SetDirection ( float  x,
float  y,
float  z 
)

Sets the node's direction vector ie it's local -z.

Remarks:
Note that the 'up' vector for the orientation will automatically be recalculated based on the current 'up' vector (i.e. the roll will remain the same). If you need more control, use setOrientation.
Parameters:
x,y,z 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 DigitalSpaces::DIOGRESceneNode::SetDirection ( float  x,
float  y,
float  z,
TransformSpace  relativeTo,
in_Vector3f localDirectionVector 
)

void DigitalSpaces::DIOGRESceneNode::SetDirection ( in_Vector3f vec  ) 

Sets the node's direction vector ie it's local -z.

Remarks:
Note that the 'up' vector for the orientation will automatically be recalculated based on the current 'up' vector (i.e. the roll will remain the same). If you need more control, use setOrientation.
Parameters:
vec 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 DigitalSpaces::DIOGRESceneNode::SetDirection ( in_Vector3f vec,
TransformSpace  relativeTo,
in_Vector3f localDirectionVector 
)

void DigitalSpaces::DIOGRESceneNode::LookAt ( in_Vector3f targetPoint,
TransformSpace  relativeTo 
)

Points the local -Z direction of this node at a point in space.

Parameters:
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 DigitalSpaces::DIOGRESceneNode::LookAt ( in_Vector3f targetPoint,
TransformSpace  relativeTo,
in_Vector3f localDirectionVector 
)

void DigitalSpaces::DIOGRESceneNode::SetAutoTracking ( bool  enabled  ) 

Enables / disables automatic tracking of another SceneNode.

Remarks:
If you enable auto-tracking, this SceneNode will automatically rotate to point it's -Z at the target SceneNode every frame, no matter how it or the other SceneNode move. Note that by default the -Z points at the origin of the target SceneNode, if you want to tweak this, provide a vector in the 'offset' parameter and the target point will be adjusted.
Parameters:
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 DigitalSpaces::DIOGRESceneNode::SetAutoTracking ( bool  enabled,
DIOGRESceneNode target,
in_Vector3f localDirectionVector,
in_Vector3f offset 
)

DIOGRESceneNode* DigitalSpaces::DIOGRESceneNode::GetAutoTrackTarget ( void   ) 

Get the auto tracking target for this node, if any.

void DigitalSpaces::DIOGRESceneNode::GetAutoTrackOffset ( out_Vector3f vec  ) 

Get the auto tracking offset for this node, if the node is auto tracking.

void DigitalSpaces::DIOGRESceneNode::GetAutoTrackLocalDirection ( out_Vector3f vec  ) 

Get the auto tracking local direction for this node, if it is auto tracking.

DIOGRESceneNode* DigitalSpaces::DIOGRESceneNode::GetParentSceneNode ( void   ) 

Gets the parent of this SceneNode.

void DigitalSpaces::DIOGRESceneNode::SetVisible ( bool  visible  ) 

Makes all objects attached to this node become visible / invisble.

Remarks:
This is a shortcut to calling setVisible() on the objects attached to this node, and optionally to all objects attached to child nodes.
Parameters:
visible Whether the objects are to be made visible or invisible
cascade If true, this setting cascades into child nodes too.

void DigitalSpaces::DIOGRESceneNode::SetVisible ( bool  visible,
bool  cascade 
)

void DigitalSpaces::DIOGRESceneNode::FlipVisibility ( void   ) 

Inverts the visibility of all objects attached to this node.

Remarks:
This is a shortcut to calling setVisible(!isVisible()) on the objects attached to this node, and optionally to all objects attached to child nodes.
Parameters:
cascade If true, this setting cascades into child nodes too.

void DigitalSpaces::DIOGRESceneNode::FlipVisibility ( bool  cascade  ) 


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

Generated on Sun Aug 31 17:46:31 2008 for Digital Spaces by  doxygen 1.5.6