This reference page is linked to from the following overview topics: 3DXI Initialization, 3DXI Scene, 3DXI Node.
Main scene access.
IGameScene is the main entry point for an exporter. It contains the initialisation routines and access to the nodes and materials of the scene. The user can ask IGame to enumerate the whole scene, selected nodes or single nodes, with or with out hierarchy.
#include <IGame.h>
Public Member Functions |
|
virtual | ~IGameScene () |
Destructor. |
|
virtual void | SetPropertyFile (const MCHAR *fileName)=0 |
Set the Property File to use. |
|
virtual bool | InitialiseIGame (bool selected=false)=0 |
Initialise IGame. |
|
virtual bool | InitialiseIGame (INode *root, bool Hierarchy=true)=0 |
Initialise IGame with a specific node.
|
|
virtual bool | InitialiseIGame (Tab< INode * > nodes, bool Hierarchy=true)=0 |
Initialise IGame with a specific set of
nodes. |
|
virtual MCHAR * | GetSceneFileName ()=0 |
Get the active filename. |
|
virtual void | SetStaticFrame (int frameNum)=0 |
Set the static frame. |
|
virtual TimeValue | GetSceneStartTime ()=0 |
Get the start of the animation range.
|
|
virtual TimeValue | GetSceneEndTime ()=0 |
Get the end of the animation range. |
|
virtual int | GetSceneTicks ()=0 |
Get the number of ticks per frame. |
|
virtual int | GetTopLevelNodeCount ()=0 |
All node access is provides by parent nodes.
|
|
virtual int | GetTotalNodeCount ()=0 |
Get the complete number of nodes. |
|
virtual IGameNode * | GetTopLevelNode (int index)=0 |
Get the actual toplevel node. |
|
virtual int | GetRootMaterialCount ()=0 |
Get the total number of parent materials.
|
|
virtual IGameMaterial * | GetRootMaterial (int index)=0 |
Access to the Root Material. |
|
virtual IGameNode * | GetIGameNode (INode *node)=0 |
Access the IGameNode from the supplied
INode. |
|
virtual IGameNode * | GetIGameNode (ULONG NodeID)=0 |
Access the IGameNode from the supplied
Node ID. |
|
virtual Tab< IGameNode * > | GetIGameNodeByType (IGameObject::ObjectTypes Type)=0 |
Access the set IGameNodes from the specified
IGame Type. |
|
virtual IGameMaterial * | GetIGameMaterial (Mtl *mat)=0 |
Access the IGameMaterial from the
supplied Mtl. |
|
virtual IGameTextureMap * | GetIGameTextureMap (Texmap *texMap)=0 |
Access the IGameTextureMap from the
supplied Texmap.
|
|
virtual void | ReleaseIGame ()=0 |
Releases IGame and free all associated
memory. |
virtual ~IGameScene | ( | ) | [inline, virtual] |
Destructor.
{;}
virtual void SetPropertyFile | ( | const MCHAR * | fileName | ) | [pure virtual] |
Set the Property File to use.
You can define the name of the file to use, including full path, that IGame uses to parse for the supported parameters. This means that you could have multiple configs depending on the various games in development. You must call this before you call InitialiseIGame(). By default the the filename will be the maxroot/plugcfg/IGameProp.XML.
fileName | The name of the property file to use inthis session. |
virtual bool InitialiseIGame | ( | bool | selected = false |
) | [pure virtual] |
Initialise IGame.
IGame can be initialised specifying whether to search for selected nodes only
selected | True if selected are searched for - default false |
virtual bool InitialiseIGame | ( | INode * | root, |
bool | Hierarchy =
true |
||
) | [pure virtual] |
Initialise IGame with a specific node.
Developer can specify a single node to parse.
root | The actual node to parse |
Hierarchy | lets IGame know to initialise the children of the node |
Initialise IGame with a specific set of nodes.
Developer can specify a set of nodes to parse. This could be implemented by creating a Tab using the 3ds Max sdk. Look at Interface::GetSelNodes() and Interface::GetSelNodeCount().
nodes | The actual tab containing the nodes to parse |
Hierarchy | lets IGame know to initialise the children of the node |
virtual MCHAR* GetSceneFileName | ( | ) | [pure virtual] |
virtual void SetStaticFrame | ( | int | frameNum | ) | [pure virtual] |
Set the static frame.
Specify the frame to use for Time access functions
frameNum | The static frame to use - Internally this will be converted to Ticks |
virtual TimeValue GetSceneStartTime | ( | ) | [pure virtual] |
Get the start of the animation range.
This provides the animation start time in ticks
virtual TimeValue GetSceneEndTime | ( | ) | [pure virtual] |
Get the end of the animation range.
This provides the animation end time in ticks
virtual int GetSceneTicks | ( | ) | [pure virtual] |
Get the number of ticks per frame.
virtual int GetTopLevelNodeCount | ( | ) | [pure virtual] |
All node access is provides by parent nodes.
This does not include the Root node as in 3ds Max. This method can be used to traverse the scene
virtual int GetTotalNodeCount | ( | ) | [pure virtual] |
Get the complete number of nodes.
The is useful for implementing a progress bar in the exporter
virtual IGameNode* GetTopLevelNode | ( | int | index | ) | [pure virtual] |
virtual int GetRootMaterialCount | ( | ) | [pure virtual] |
Get the total number of parent materials.
This does not include sub materials - just the number of actual material containers
virtual IGameMaterial* GetRootMaterial | ( | int | index | ) | [pure virtual] |
Access to the Root Material.
This is the parent material that is stored on the Node. The material will host any sub materials and access is provided by the IGameMaterial interface.
index | The root material to access |
Access the IGameNode from the supplied INode.
Some IGame methods provide access to INode lists. You can use this method to retrieve the IGameNode equivelent IGame must be initialised first, as the node must be in the Database
node | The 3ds Max node to find |
virtual IGameNode* GetIGameNode | ( | ULONG | NodeID | ) | [pure virtual] |
virtual Tab<IGameNode*> GetIGameNodeByType | ( | IGameObject::ObjectTypes | Type | ) | [pure virtual] |
Access the set IGameNodes from the specified IGame Type.
You can use this method to retrieve the IGameNode based on IGameObject::ObjectTypes. IGame must be initialised first, as the node must be in the Database
Type | The IGameObject::ObjectTypes to find |
virtual IGameMaterial* GetIGameMaterial | ( | Mtl * | mat | ) | [pure virtual] |
Access the IGameMaterial from the supplied Mtl.
You can use this method to retrieve the IGameMaterial equivelent IGame must be initialised first, Material doesn't have to be part of database
mat | The 3ds Max Material |
virtual IGameTextureMap* GetIGameTextureMap | ( | Texmap * | texMap | ) | [pure virtual] |
Access the IGameTextureMap from the supplied Texmap.
You can use this method to retrieve the IGameTextureMap equivelent IGame must be initialised first, Texture doesn't have to be part of database
texMap | The 3ds Max Texture Map |
virtual void ReleaseIGame | ( | ) | [pure virtual] |
Releases IGame and free all associated memory.
This must be called after you have finished with IGame. It makes sure all data is freed and general clean up is performed. Without calling this there is the risk of corrupting memory, and causing incorrect data to returned the next time IGame is run