ObjectNode Class Reference

#include <Ample.h>

Inheritance diagram for ObjectNode:
Inheritance graph
[legend]
Collaboration diagram for ObjectNode:
Collaboration graph
[legend]

List of all members.

Public Types

typedef Observer< NodeObserverObserverType
typedef std::vector
< NodeObserver * > 
ObserverList

Public Member Functions

void createMethodGroup (const std::string &name)
void createLink (const std::string &name, VNodeID nodeID, VNodeID targetID=(VNodeID)~0)
bool isLight (void) const
void setLightIntensity (const ColorRGB &intensity)
const ColorRGBgetLightIntensity (void) const
MethodGroupgetMethodGroupByID (uint16 groupID)
const MethodGroupgetMethodGroupByID (uint16 groupID) const
MethodGroupgetMethodGroupByIndex (unsigned int index)
const MethodGroupgetMethodGroupByIndex (unsigned int index) const
MethodGroupgetMethodGroupByName (const std::string &name)
const MethodGroupgetMethodGroupByName (const std::string &name) const
unsigned int getMethodGroupCount (void) const
LinkgetLinkByID (uint16 groupID)
const LinkgetLinkByID (uint16 groupID) const
LinkgetLinkByIndex (unsigned int index)
const LinkgetLinkByIndex (unsigned int index) const
LinkgetLinkByName (const std::string &name)
const LinkgetLinkByName (const std::string &name) const
unsigned int getLinkCount (void) const
NodegetNodeByLinkName (const std::string &name) const
void setTranslation (const Translation &translation)
void setRotation (const Rotation &rotation)
const Vector3dgetPosition (void) const
void setPosition (const Vector3d &position)
const Vector3dgetSpeed (void) const
void setSpeed (const Vector3d &speed)
const Vector3dgetAccel (void) const
void setAccel (const Vector3d &accel)
const Quaternion64getRotation (void) const
void setRotation (const Quaternion64 &rotation)
const Quaternion64getRotationSpeed (void) const
void setRotationSpeed (const Quaternion64 &speed)
const Quaternion64getRotationAccel (void) const
void setRotationAccel (const Quaternion64 &accel)
const Vector3dgetScale (void) const
void setScale (const Vector3d &scale)
void destroy (void)
void createTagGroup (const std::string &name)
TagGroupgetTagGroupByID (uint16 ID)
const TagGroupgetTagGroupByID (uint16 ID) const
TagGroupgetTagGroupByIndex (unsigned int index)
const TagGroupgetTagGroupByIndex (unsigned int index) const
TagGroupgetTagGroupByName (const std::string &name)
const TagGroupgetTagGroupByName (const std::string &name) const
unsigned int getTagGroupCount (void) const
TaggetTagByNames (const std::string &groupName, const std::string &tagName)
const TaggetTagByNames (const std::string &groupName, const std::string &tagName) const
bool isMine (void) const
VNodeID getID (void) const
VNodeType getType (void) const
const std::string & getName (void) const
void setName (const std::string &name)
SessiongetSession (void) const
unsigned int getDataVersion (void) const
unsigned int getStructureVersion (void) const
void addObserver (NodeObserver &observer)
void removeObserver (NodeObserver &observer)
void removeObserver (Observer< NodeObserver > &observer)
const ObserverListgetObservers (void) const

Friends

class Session

Detailed Description

Object node class. Represents a single object node.


Member Typedef Documentation

typedef std::vector<NodeObserver *> ObserverList [inherited]
typedef Observer<NodeObserver > ObserverType [inherited]

Member Function Documentation

void addObserver ( NodeObserver observer  )  [inline, inherited]

Adds the specified observer to this object.

Parameters:
observer The observer to add.
Remarks:
An observer can only be added once. Additional additions are ignored.
void createLink ( const std::string &  name,
VNodeID  nodeID,
VNodeID  targetID = (VNodeID)~0 
)

Creates a new link to the specified node.

Parameters:
name The desired name of the link.
nodeID The ID of the node to link to.
targetID Who knows.
Remarks:
This call is asynchronous. It will not take effect until, at the earliest, after the first subsequent call to Session::update.
void createMethodGroup ( const std::string &  name  ) 

Creates a new method group in this node.

Parameters:
name The desired name of the method group.
Remarks:
This call is asynchronous. It will not take effect until, at the earliest, after the first subsequent call to Session::update.
void createTagGroup ( const std::string &  name  )  [inherited]

Creates a new tag group in this node.

Parameters:
name The desired name of the tag group.
Remarks:
This call is asynchronous. It will not take effect until, at the earliest, after the first subsequent call to Session::update.
void destroy ( void   )  [inherited]

Destroys this node.

Remarks:
This call is asynchronous. It will not take effect until, at the earliest, after the first subsequent call to Session::update.
const Vector3d& getAccel ( void   )  const
Returns:
The current movement acceleration of this object node.
unsigned int getDataVersion ( void   )  const [inherited]
Returns:
The current version of the internal state.
Remarks:
This value is updated for any kind of change.
VNodeID getID ( void   )  const [inherited]
Returns:
The ID of this node.
const ColorRGB& getLightIntensity ( void   )  const
Returns:
The light intensity of this object node.
const Link* getLinkByID ( uint16  groupID  )  const
Parameters:
groupID The ID of the desired link.
Returns:
The link with the specified ID, or NULL if no such link exists.
Link* getLinkByID ( uint16  groupID  ) 
Parameters:
groupID The ID of the desired link.
Returns:
The link with the specified ID, or NULL if no such link exists.
const Link* getLinkByIndex ( unsigned int  index  )  const
Parameters:
index The index of the desired link.
Returns:
The link at the specified index, or NULL if no such link exists.
Link* getLinkByIndex ( unsigned int  index  ) 
Parameters:
index The index of the desired link.
Returns:
The link at the specified index, or NULL if no such link exists.
const Link* getLinkByName ( const std::string &  name  )  const
Parameters:
name The name of the desired link
Returns:
The link with the specified name, or NULL if no such link exists.
Link* getLinkByName ( const std::string &  name  ) 
Parameters:
name The name of the desired link
Returns:
The link with the specified name, or NULL if no such link exists.
unsigned int getLinkCount ( void   )  const
Returns:
The number of links in this node.
const MethodGroup* getMethodGroupByID ( uint16  groupID  )  const
Parameters:
groupID The ID of the desired method group.
Returns:
The method group with the specified ID, or NULL if no such method group exists.
MethodGroup* getMethodGroupByID ( uint16  groupID  ) 
Parameters:
groupID The ID of the desired method group.
Returns:
The method group with the specified ID, or NULL if no such method group exists.
const MethodGroup* getMethodGroupByIndex ( unsigned int  index  )  const
Parameters:
index The index of the desired method group.
Returns:
The method group at the specified index, or NULL if no such method group exists.
MethodGroup* getMethodGroupByIndex ( unsigned int  index  ) 
Parameters:
index The index of the desired method group.
Returns:
The method group at the specified index, or NULL if no such method group exists.
const MethodGroup* getMethodGroupByName ( const std::string &  name  )  const
Parameters:
name The name of the desired method group
Returns:
The method group with the specified name, or NULL if no such method group exists.
MethodGroup* getMethodGroupByName ( const std::string &  name  ) 
Parameters:
name The name of the desired method group
Returns:
The method group with the specified name, or NULL if no such method group exists.
unsigned int getMethodGroupCount ( void   )  const
Returns:
The number of method groups in this node.
const std::string& getName ( void   )  const [inherited]
Returns:
The name of this node.
Node* getNodeByLinkName ( const std::string &  name  )  const
Parameters:
name The name of the link to return the node of.
Returns:
The node pointed to by the link with the specified name.
const ObserverList& getObservers ( void   )  const [inline, inherited]
Returns:
The list of observers attached to this object.
const Vector3d& getPosition ( void   )  const
Returns:
The current position of this object node.
const Quaternion64& getRotation ( void   )  const
Returns:
The current rotation of this object node.
const Quaternion64& getRotationAccel ( void   )  const
const Quaternion64& getRotationSpeed ( void   )  const
const Vector3d& getScale ( void   )  const
Returns:
The scaling of this object node.
Session& getSession ( void   )  const [inherited]
Returns:
The session containing this node.
const Vector3d& getSpeed ( void   )  const
Returns:
The current movement speed of this object node.
unsigned int getStructureVersion ( void   )  const [inherited]
Returns:
The current version of the internal structure.
Remarks:
This value is only updated when the internal structure changes.
const Tag* getTagByNames ( const std::string &  groupName,
const std::string &  tagName 
) const [inherited]
Parameters:
groupName The name of the group of the desired tag.
tagName The name of the desired tag.
Returns:
The tag with the specified name, in the specified group.
Tag* getTagByNames ( const std::string &  groupName,
const std::string &  tagName 
) [inherited]
Parameters:
groupName The name of the group of the desired tag.
tagName The name of the desired tag.
Returns:
The tag with the specified name, in the specified group.
const TagGroup* getTagGroupByID ( uint16  ID  )  const [inherited]
Parameters:
ID The ID of the desired tag group.
Returns:
The tag group with the specified ID, or NULL if no such tag group exists.
TagGroup* getTagGroupByID ( uint16  ID  )  [inherited]
Parameters:
ID The ID of the desired tag group.
Returns:
The tag group with the specified ID, or NULL if no such tag group exists.
const TagGroup* getTagGroupByIndex ( unsigned int  index  )  const [inherited]
Parameters:
index The index of the desired tag group.
Returns:
The tag group at the specified index, or NULL if no such tag group exists.
TagGroup* getTagGroupByIndex ( unsigned int  index  )  [inherited]
Parameters:
index The index of the desired tag group.
Returns:
The tag group at the specified index, or NULL if no such tag group exists.
const TagGroup* getTagGroupByName ( const std::string &  name  )  const [inherited]
Parameters:
name The name of the desired tag group.
Returns:
The tag group with the specified name, or NULL if no such tag group exists.
TagGroup* getTagGroupByName ( const std::string &  name  )  [inherited]
Parameters:
name The name of the desired tag group.
Returns:
The tag group with the specified name, or NULL if no such tag group exists.
unsigned int getTagGroupCount ( void   )  const [inherited]
Returns:
The number of tag groups in this node.
VNodeType getType ( void   )  const [inherited]
Returns:
The type of this node.
bool isLight ( void   )  const
Returns:
true if this object node emits light, otherwise false.
Remarks:
This is a helper method and not strictly neccessary.
bool isMine ( void   )  const [inherited]
Returns:
true if this node was created from this client, otherwise false.
void removeObserver ( Observer< NodeObserver > &  observer  )  [inline, inherited]

Removes the specified observer from this object.

Parameters:
observer The observer to remove.
void removeObserver ( NodeObserver observer  )  [inline, inherited]

Removes the specified observer from this object.

Parameters:
observer The observer to remove.
void setAccel ( const Vector3d accel  ) 

Sets the movement acceleration of this object node.

Parameters:
accel The desired new movement acceleration.
Remarks:
This call is asynchronous. It will not take effect until, at the earliest, after the first subsequent call to Session::update.
void setLightIntensity ( const ColorRGB intensity  ) 

Sets the light intensity of this object node. If set to non-zero, this object node becomes a light source.

void setName ( const std::string &  name  )  [inherited]

Changes the name of this node.

Parameters:
name The desired name.
Remarks:
This call is asynchronous. It will not take effect until, at the earliest, after the first subsequent call to Session::update.
void setPosition ( const Vector3d position  ) 

Sets the position of this object node.

Parameters:
position The desired new position.
Remarks:
This call is asynchronous. It will not take effect until, at the earliest, after the first subsequent call to Session::update.
void setRotation ( const Quaternion64 rotation  ) 

Sets the rotation of this object node.

Parameters:
rotation The desired new rotation.
Remarks:
This call is asynchronous. It will not take effect until, at the earliest, after the first subsequent call to Session::update.
void setRotation ( const Rotation rotation  ) 
void setRotationAccel ( const Quaternion64 accel  ) 
void setRotationSpeed ( const Quaternion64 speed  ) 
void setScale ( const Vector3d scale  ) 

Changes the scaling of this object node.

Parameters:
scale The desired scaling.
void setSpeed ( const Vector3d speed  ) 

Sets the movement speed of this object node.

Parameters:
speed The desired new movement speed.
Remarks:
This call is asynchronous. It will not take effect until, at the earliest, after the first subsequent call to Session::update.
void setTranslation ( const Translation translation  ) 

Friends And Related Function Documentation

friend class Session [friend]

Reimplemented from Node.


Generated on Thu Nov 19 20:19:29 2009 for Ample by  doxygen 1.6.1