DigitalSpaces::DISGNode Struct Reference
[SceneGraph]

#include <Scenegraph.h>

Inherits DigitalSpaces::DIObjectBase.


Detailed Description

The common functionality of the scenegraph heirachy organisation.

This is implemented by the scengraph manager, and is the main interface code will use for controlling the scenegraph.


Public Member Functions

const char * GetName ()
 Return the name provided when created.
const char * GetType ()
 Return the sub-type.
void SetPosition (in_Vector3f *pos)
 Set the position of the node.
void GetPosition (out_Vector3f *pos)
 Retreive the position of the node.
void SetOrientation (in_Quaternionf *orient)
 Set the orientation of the node.
void GetOrientation (out_Quaternionf *orient)
 Retreive the orientation of the node.
void SetScale (in_Vector3f *scale)
 Set the scale to be applied to the render objects attached to the node.
void GetScale (out_Vector3f *scale)
 Retreive the scale applied to render objects attached to the node.
DISGNodeCreateChild (const char *name, DIXMLNode1 *configuration)
 Convenience function for DISGManager::CreateSGNode(name, "node", this, configuration).
DISGNodeGetChild (const char *name)
 Retreive a child node.
bool AddChild (DISGNode *child)
 Add a child node.
bool RemoveChild (const char *name)
 Remove a child node.
void GetChildNames (DIStringList1 *names)
 Retreive a list of the names of all child nodes.
DISGRenderObjectCreateAttachedObject (const char *name, const char *type, DIXMLNode1 *configuration)
 Convenience function for DISGManager::CreateSGRenderObject(name, type, this, configuration).
DISGRenderObjectGetAttachedObject (const char *name)
 Retreive an attached render object.
bool AttachObject (DISGRenderObject *object)
 Attach a render object to this node.
bool DetachObject (const char *name)
 Detatches an object from this node.
void GetAttachedObjectNames (DIStringList1 *names)
 Retreive a list of the names of all attached render object.
DISGNodeGetSGParent ()
 Return the parent node.
void CreateAdditionalRepresentations (const char *type, DIXMLNode1 *configuration)
 Allows creation of additional representations (from DISGRepresentative) using different information.

Member Function Documentation

const char* DigitalSpaces::DISGNode::GetName (  ) 

Return the name provided when created.

const char* DigitalSpaces::DISGNode::GetType (  ) 

Return the sub-type.

This should only be used as a general peice of information, attempting to dss_cast is a better way of detecting what an object is/can do

An example value is node (created from a <node>).

void DigitalSpaces::DISGNode::SetPosition ( in_Vector3f pos  ) 

Set the position of the node.

Parameters:
pos New position of the node. This is relative to its parent.

void DigitalSpaces::DISGNode::GetPosition ( out_Vector3f pos  ) 

Retreive the position of the node.

Parameters:
[out] pos Vector to be filled with the position of the node. This is relative to its parent.

void DigitalSpaces::DISGNode::SetOrientation ( in_Quaternionf orient  ) 

Set the orientation of the node.

Parameters:
orient New orientation of the node. This is relative to the parent.

void DigitalSpaces::DISGNode::GetOrientation ( out_Quaternionf orient  ) 

Retreive the orientation of the node.

Parameters:
[out] orient Quaternion to be filled with the orientation of the node. This is relative to it's parent.

void DigitalSpaces::DISGNode::SetScale ( in_Vector3f scale  ) 

Set the scale to be applied to the render objects attached to the node.

Parameters:
scale Per-axis multiplier to be applied to the attached render objects.
Note:
By default scale is inherited. (I think.)

void DigitalSpaces::DISGNode::GetScale ( out_Vector3f scale  ) 

Retreive the scale applied to render objects attached to the node.

Parameters:
[out] scale Vector to be filled with the per-axis multiplier.

DISGNode* DigitalSpaces::DISGNode::CreateChild ( const char *  name,
DIXMLNode1 configuration 
)

Convenience function for DISGManager::CreateSGNode(name, "node", this, configuration).

DISGNode* DigitalSpaces::DISGNode::GetChild ( const char *  name  ) 

Retreive a child node.

This includes attached render objects that have implementations that also implemented DISGNodeRepresentation - i.e. non-node heirachal objects or non-node positionable objects.

Returns:
Interface to the child node, or NULL if no node by that name is a direct child.

bool DigitalSpaces::DISGNode::AddChild ( DISGNode child  ) 

Add a child node.

This is generally used to move nodes from one point on the scene heirachy to another.

Returns:
True if sucessful, false if an error occurs.
Note:
Does calling this with an already attached node (one that hasn't been passed to RemoveChild as appropriate) work with the current implementation? What happens? - What should happen?

bool DigitalSpaces::DISGNode::RemoveChild ( const char *  name  ) 

Remove a child node.

Returns:
True if sucessful, false if an error occured (such as the specified node not being a child).
Note:
This removes the node from the heirachy, but does not destroy it. It may be attached elsewhere using AddChild.

void DigitalSpaces::DISGNode::GetChildNames ( DIStringList1 names  ) 

Retreive a list of the names of all child nodes.

This is not recursive, i.e it only returns the direct children.

Parameters:
names String List that will have the names of the child nodes appended. The implementation does not clear the list before appending.

DISGRenderObject* DigitalSpaces::DISGNode::CreateAttachedObject ( const char *  name,
const char *  type,
DIXMLNode1 configuration 
)

Convenience function for DISGManager::CreateSGRenderObject(name, type, this, configuration).

DISGRenderObject* DigitalSpaces::DISGNode::GetAttachedObject ( const char *  name  ) 

Retreive an attached render object.

Returns:
Interface to attached render object, or NULL if there is no render object by that name attached to this node.

bool DigitalSpaces::DISGNode::AttachObject ( DISGRenderObject object  ) 

Attach a render object to this node.

This is generally used to move render objects from one point on the scene heirachy to another.

Returns:
True if sucessful, false if an error occurs.
Todo:
How does it handle render objects that are also implement DISGNode?

bool DigitalSpaces::DISGNode::DetachObject ( const char *  name  ) 

Detatches an object from this node.

Note:
This does not destroy the object, and it may be later attached elsewhere.
Returns:
True if sucessful, false if an error occurs.

void DigitalSpaces::DISGNode::GetAttachedObjectNames ( DIStringList1 names  ) 

Retreive a list of the names of all attached render object.

This is not recursive, i.e it only returns the render objects attached to this node, not any children..

Parameters:
names String List that will have the names of the render objects appended. The implementation does not clear the list before appending.

DISGNode* DigitalSpaces::DISGNode::GetSGParent (  ) 

Return the parent node.

Returns:
Interface to parent node, or NULL if this node is not attached to the scene graph, or is the root of the scenegraph.

void DigitalSpaces::DISGNode::CreateAdditionalRepresentations ( const char *  type,
DIXMLNode1 configuration 
)

Allows creation of additional representations (from DISGRepresentative) using different information.


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

Generated on Thu Jul 10 16:21:36 2008 for Digital Spaces by  doxygen 1.5.6