IGameNode Class Reference

#include <IGame.h>

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
+ Inheritance diagram for IGameNode:

Public Member Functions

virtual ~IGameNode ()
 Destructor. More...
 
virtual IGameControlGetIGameControl ()=0
 Get the IGameControl Interface. More...
 
virtual IGameObjectGetIGameObject ()=0
 Get the actual object. More...
 
virtual void ReleaseIGameObject ()=0
 Release the IGameObject obtained from GetIGameObject. More...
 
virtual const MCHARGetName ()=0
 Get the node name. More...
 
virtual int GetNodeID ()=0
 Get the unique Node ID. More...
 
virtual INodeGetMaxNode ()=0
 Access to the 3ds Max node, if further processing is required. More...
 
virtual GMatrix GetWorldTM (TimeValue t=TIME_NegInfinity)=0
 Get World TM. More...
 
virtual GMatrix GetLocalTM (TimeValue t=TIME_NegInfinity)=0
 Get Local TM. More...
 
virtual GMatrix GetObjectTM (TimeValue t=TIME_NegInfinity)=0
 Get Object TM. More...
 
virtual IGameNodeGetNodeParent ()=0
 Get the nodes parent. More...
 
virtual int GetChildCount ()=0
 Get the number of direct children to the parent. More...
 
virtual IGameNodeGetNodeChild (int index)=0
 Access the n'th child node of the parent node. More...
 
virtual int GetMaterialIndex ()=0
 Get the material index. More...
 
virtual IGameMaterialGetNodeMaterial ()=0
 Get the material. More...
 
virtual IPoint3GetWireframeColor ()=0
 Get the wireframe color. More...
 
virtual bool IsTarget ()=0
 Check if a Target Node. More...
 
virtual bool IsGroupOwner ()=0
 Check if a Group Head. More...
 
virtual bool IsNodeHidden ()=0
 Check if the node hidden. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Constructor & Destructor Documentation

virtual ~IGameNode ( )
inlinevirtual

Destructor.

40 {;}

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
tthe 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
tthe 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
tthe 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
indexThe 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