IGameNode Class Reference
 
 
 
IGameNode Class Reference

This reference page is linked to from the following overview topics: 3DXI Scene, 3DXI Node, 3DXI Objects, 3DXI IK Chains, 3DXI Initialization.


#include <IGame.h>

Inheritance diagram for IGameNode:
MaxHeapOperators

Class Description

A simple wrapper for max nodes.

IGameNode provides simplified access to many of 3ds Max's standard Node. The user can use this class to gain access to Controllers and Objects, plus many basic node properties. An instance of this class is available through the IGameScene interfaces.

See also:
IGameScene
IGameObject

Public Member Functions

virtual  ~IGameNode ()
  Destructor.
virtual IGameControl GetIGameControl ()=0
  Get the IGameControl Interface.
virtual IGameObject GetIGameObject ()=0
  Get the actual object.
virtual void  ReleaseIGameObject ()=0
  Release the IGameObject obtained from GetIGameObject.
virtual const MCHAR *  GetName ()=0
  Get the node name.
virtual int  GetNodeID ()=0
  Get the unique Node ID.
virtual INode GetMaxNode ()=0
  Access to the 3ds Max node, if further processing is required.
virtual GMatrix  GetWorldTM (TimeValue t=TIME_NegInfinity)=0
  Get World TM.
virtual GMatrix  GetLocalTM (TimeValue t=TIME_NegInfinity)=0
  Get Local TM.
virtual GMatrix  GetObjectTM (TimeValue t=TIME_NegInfinity)=0
  Get Object TM.
virtual IGameNode GetNodeParent ()=0
  Get the nodes parent.
virtual int  GetChildCount ()=0
  Get the number of direct children to the parent.
virtual IGameNode GetNodeChild (int index)=0
  Access the n'th child node of the parent node.
virtual int  GetMaterialIndex ()=0
  Get the material index.
virtual IGameMaterial GetNodeMaterial ()=0
  Get the material.
virtual IPoint3 GetWireframeColor ()=0
  Get the wireframe color.
virtual bool  IsTarget ()=0
  Check if a Target Node.
virtual bool  IsGroupOwner ()=0
  Check if a Group Head.
virtual bool  IsNodeHidden ()=0
  Check if the node hidden.

Constructor & Destructor Documentation

virtual ~IGameNode ( ) [inline, virtual]

Destructor.

{;}

Member Function Documentation

virtual IGameControl* GetIGameControl ( ) [pure virtual]

Get the IGameControl Interface.

The IGameControl provides access to the key frame data for the node

Returns:
An IGameControl pointer.
virtual IGameObject* GetIGameObject ( ) [pure virtual]

Get the actual object.

The is the object used by IGame, all the basic objects supported by IGame derive from IGameObject IGameObject::GetIGameType should be used to determine how to cast the returned pointer.

Returns:
An IGameObject pointer
virtual void ReleaseIGameObject ( ) [pure virtual]

Release the IGameObject obtained from GetIGameObject.

This will release all the memory used by the object, but it will not effect any controller or transfrom data. Remember to call GetIGameObject if you want to use it again.
Starting with IGame v 1.2 reference counter used internally, so IGameObject will be released only in case of matching GetIGameObject/ReleaseIGameObject calls.

virtual const MCHAR* GetName ( ) [pure virtual]

Get the node name.

The name of the node as used in max

Returns:
The name of the object
virtual int GetNodeID ( ) [pure virtual]

Get the unique Node ID.

This provideds access to the node handle used in 3ds Max. This value will be unique for the file

Returns:
The node ID (node handle)
virtual INode* GetMaxNode ( ) [pure virtual]

Access to the 3ds Max node, if further processing is required.

if need be the node can be accessed here - this is so that IGame can be intergrated into existing pipelines

Returns:
A pointer to a Max node
virtual GMatrix GetWorldTM ( TimeValue  t = TIME_NegInfinity ) [pure virtual]

Get World TM.

Parameters:
t the Time to retrieve the WorldTM. If no time is passed in then the global static frame is used
Returns:
A matrix containing the World TM
virtual GMatrix GetLocalTM ( TimeValue  t = TIME_NegInfinity ) [pure virtual]

Get Local TM.

Parameters:
t the Time to retrieve the LocalTM. If no time is passed in then the global static frame is used
Returns:
A Matrix containing the local TM
virtual GMatrix GetObjectTM ( TimeValue  t = TIME_NegInfinity ) [pure virtual]

Get Object TM.

Parameters:
t the Time to retrieve the ObjectTM. If no time is passed in then the global static frame is used
Returns:
A Matrix containing the Object TM. This is the TM after any world space transforms have been applied
virtual IGameNode* GetNodeParent ( ) [pure virtual]

Get the nodes parent.

If this is a top level node, then it will not have any parents

Returns:
If there is a parent a valid pointer will be returned, else NULL
virtual int GetChildCount ( ) [pure virtual]

Get the number of direct children to the parent.

This does not include children of children

Returns:
The number of children
virtual IGameNode* GetNodeChild ( int  index ) [pure virtual]

Access the n'th child node of the parent node.

Parameters:
index The index to the child to retrieve
Returns:
IGameNode pointer to the child
virtual int GetMaterialIndex ( ) [pure virtual]

Get the material index.

The index into the material array for this node's material

Returns:
The index of material used by this node
virtual IGameMaterial* GetNodeMaterial ( ) [pure virtual]

Get the material.

Direct access to the actual material used by the node

Returns:
The IGameMaterial pointer for this node.
virtual IPoint3& GetWireframeColor ( ) [pure virtual]

Get the wireframe color.

Access to the wireframe color used by this node.

Returns:
An IPoint3 (r,g,b) color, with values in the range 0-255
virtual bool IsTarget ( ) [pure virtual]

Check if a Target Node.

Can be used for exporting targets. Exporters often treat targets separately to standard nodes choosing to export them as part of the node that uses them as targets for example lights and cameras

Returns:
TRUE if it is a target
virtual bool IsGroupOwner ( ) [pure virtual]

Check if a Group Head.

A group in 3ds Max has an owner, a Group Head, this is a dummy node. The children of a Group Head are the members of the group. So when you encounter one of these, look for the children as these will be the members of the group.

Returns:
TRUE if a "Group Head"
virtual bool IsNodeHidden ( ) [pure virtual]

Check if the node hidden.

This allows access to the hidden property of the node. A developer may choose to ignore any node that is hidden. However this can be dangerous as many dummy objects get hidden but actually define animation - especially in IK situations

Returns:
TRUE if hidden