#include <IGameObject.h>
Simple wrapper for 3ds Max objects.
This is heart of the interaction with 3ds Max objects. 3ds Max objects are converted to IGame objects to provide simpler interfaces. Specific support is given to Meshes, Splines, Helper (including bones) and Cameras. Any object that is not supported by IGame directly is supported as a generic object, so that properties can be extracted easily. At the present time IGame only supports Geom Objects that can be converted to a Tri Object.
A note about XRef items. IGame will search out XRef Objects and store them as IGameXrefObject. External file names and proxies can be accessed by casting IGameObject* to IGameXrefObject*
Some of the interfaces returned by IGameObject require that the nodes be parsed by IGame first.
Public Types | |
enum | ObjectTypes { IGAME_UNKNOWN, IGAME_LIGHT, IGAME_MESH, IGAME_SPLINE, IGAME_CAMERA, IGAME_HELPER, IGAME_BONE, IGAME_IKCHAIN, IGAME_XREF } |
Various IGame Object types. More... | |
enum | MaxType { IGAME_MAX_UNKNOWN, IGAME_MAX_GEOM, IGAME_MAX_SHAPE, IGAME_MAX_LIGHT, IGAME_MAX_CAMERA, IGAME_MAX_BONE, IGAME_MAX_HELPER } |
Various 3ds Max Object types. More... | |
Public Member Functions | |
IGameObject () | |
Default constructor. More... | |
IGAMEEXPORT void | GetBoundingBox (Box3 &bb) |
The bounding box of the object. More... | |
IGAMEEXPORT bool | IsRenderable () |
Check if object renderable. More... | |
virtual ObjectTypes | GetIGameType ()=0 |
The IGame object type. More... | |
IGAMEEXPORT Object * | GetMaxObject () |
Access to the actual 3ds Max object. More... | |
IGAMEEXPORT MaxType | GetMaxType () |
The 3ds Max object type. More... | |
IGAMEEXPORT int | GetNumModifiers () |
The number of modifiers active on the object. More... | |
IGAMEEXPORT IGameModifier * | GetIGameModifier (int index) |
Access to IGame modifier. More... | |
IGAMEEXPORT | IGameObject (INode *node) |
The IGameObject constructor. More... | |
IGAMEEXPORT bool | CastShadows () |
Check if Object casts shadows. More... | |
IGAMEEXPORT bool | IsObjectSkinned () |
Check if object skinned. More... | |
IGAMEEXPORT IGameSkin * | GetIGameSkin () |
Access to the Skin interface. More... | |
IGAMEEXPORT bool | IsObjectXRef () |
Check if XRef object. More... | |
IGAMEEXPORT GMatrix | GetIGameObjectTM () |
Access to the ObjectTM. More... | |
virtual bool | InitializeData () |
Extract the 3ds Max data into IGame data. More... | |
virtual | ~IGameObject ()=0 |
Public Member Functions inherited from IExportEntity | |
virtual | ~IExportEntity () |
Destructor. More... | |
virtual IPropertyContainer * | GetIPropertyContainer () |
Retrieve the Property Container. More... | |
virtual bool | IsEntitySupported () |
Is the Entity directly supported. More... | |
virtual const MCHAR * | GetClassName ()=0 |
Retrieves the name of the entity class. More... | |
Protected Member Functions | |
void | SetNode (INode *n) |
Protected Attributes | |
INode * | gameNode |
Object * | gameObject |
Additional Inherited Members | |
Static Public Member Functions inherited from MaxHeapOperators | |
static UtilExport void * | operator new (size_t size) |
Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More... | |
static UtilExport void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | operator new[] (size_t size, int block_type, const char *filename, int line) |
New operator used to allocate arrays of objects. More... | |
static UtilExport void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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... | |
enum ObjectTypes |
enum MaxType |
These are 3ds Max object - Developers can use this to cast the Object pointer to one of the relevent 3ds Max classes
Enumerator | |
---|---|
IGAME_MAX_UNKNOWN |
An unknown object. |
IGAME_MAX_GEOM |
A Geom Object. |
IGAME_MAX_SHAPE |
A Shape Object. |
IGAME_MAX_LIGHT | |
IGAME_MAX_CAMERA | |
IGAME_MAX_BONE |
A Bone Object. |
IGAME_MAX_HELPER |
A Helper Object. |
IGameObject | ( | ) |
Default constructor.
IGAMEEXPORT IGameObject | ( | INode * | node | ) |
The IGameObject constructor.
*node | The 3ds Max node to initialise |
|
pure virtual |
IGAMEEXPORT void GetBoundingBox | ( | Box3 & | bb | ) |
The bounding box of the object.
bb | The Box3 to receive the value |
IGAMEEXPORT bool IsRenderable | ( | ) |
Check if object renderable.
|
pure virtual |
The IGame object type.
Return the Type of IGameObject it represents
IGAMEEXPORT Object* GetMaxObject | ( | ) |
IGAMEEXPORT MaxType GetMaxType | ( | ) |
The 3ds Max object type.
This lets the developer know what type of object - Light, Geom, Helper etc... This is different from the IGame types, as these may group more than one type of 3ds Max object together. The information can be used to cast Object returned from IGameObject::GetMaxObject to the appropriate class.
IGAMEEXPORT int GetNumModifiers | ( | ) |
The number of modifiers active on the object.
IGAMEEXPORT IGameModifier* GetIGameModifier | ( | int | index | ) |
Access to IGame modifier.
Get a pointer to the IGame representation of the modifier
index | The index of the modifier to return |
IGAMEEXPORT bool CastShadows | ( | ) |
Check if Object casts shadows.
IGAMEEXPORT bool IsObjectSkinned | ( | ) |
Check if object skinned.
Is object skinned with either Physique of Skin
IGAMEEXPORT IGameSkin* GetIGameSkin | ( | ) |
Access to the Skin interface.
IGAMEEXPORT bool IsObjectXRef | ( | ) |
IGAMEEXPORT GMatrix GetIGameObjectTM | ( | ) |
Access to the ObjectTM.
Get the ObjectTM. This is the matrix needed to calculate world space
|
inlinevirtual |
Extract the 3ds Max data into IGame data.
Some extraction processes are time and memory consuming. This method allows the developer to specify when they want the data to be converted - this prevents any unwanted data being converted. This is important for IGameMesh class - if you are just after parameter data, you don't want the whole vertex array being sorted. Calling this tells the object that you want the data be converted.
|
protected |
|
protected |