NodeEventNamespace Namespace Reference
 
 
 
NodeEventNamespace Namespace Reference

Typedefs

typedef AnimHandle  NodeKey
typedef Tab< NodeKey NodeKeyTab
typedef
SceneEventNamespace::CallbackKey 
CallbackKey

Functions

NodeKey  GetKeyByNode (INode *node)
  Returns the NodeKey for a node object.
INode GetNodeByKey (NodeKey nodeKey)
  Returns a node object from a NodeKey.

Typedef Documentation


Function Documentation

NodeKey NodeEventNamespace::GetKeyByNode ( INode node ) [inline]

Returns the NodeKey for a node object.

Returns a node's key value, which is the AnimHandle for the node object.

Parameters:
[in] node The node object.
Returns:
The node's key value.
                                                   {
                if( node!=NULL )
                         return Animatable::GetHandleByAnim((Animatable*)node);
                else return 0;
        }
INode* NodeEventNamespace::GetNodeByKey ( NodeKey  nodeKey ) [inline]

Returns a node object from a NodeKey.

Returns a node object from its key value, which is the AnimHandle for the node object.

Parameters:
[in] nodeKey The node's key value, which is the AnimHandle for the node object.
Returns:
The node object.
                                                      {
                Animatable* anim = Animatable::GetAnimByHandle(nodeKey);
                if( (anim!=NULL) && (anim->SuperClassID()==BASENODE_CLASS_ID) )
                         return (INode*)anim;
                else return NULL;
        }