IGameMaterial Class Reference

#include <IGameMaterial.h>

Class Description

Simple wrapper for 3ds Max materials.

IGameMaterial is IGame Wrapper around a basic Material. It provides access to the basic material properties and Bitmap Textures used by the material. Any material will be wrapped in this class, but only Standard Material is directly supported with API access to the properties. If the material is not directly supported then the data can be access via the IPropertyContainer interface.

See also
IGameProperty, IGameScene
+ Inheritance diagram for IGameMaterial:

Public Member Functions

virtual bool IsMultiType ()=0
 Check if the material is a Multi Material type. More...
 
virtual bool IsSubObjType ()=0
 Check if the material is a SubObject style Multi Material. More...
 
virtual const MCHARGetMaterialName ()=0
 Get the material name as seen in the Material Editor. More...
 
virtual const MCHARGetMaterialClass ()=0
 Get the material class as seen in the Material Editor. More...
 
virtual int GetSubMaterialCount ()=0
 Get the number of sub materials. More...
 
virtual IGameMaterialGetSubMaterial (int index)=0
 Access to any sub material. More...
 
virtual int GetMaterialID (int subIndex)=0
 Get the MatID for subobject materials. More...
 
virtual IGamePropertyGetAmbientData ()=0
 Get the Ambient Data. More...
 
virtual IGamePropertyGetDiffuseData ()=0
 Get the Diffuse Data. More...
 
virtual IGamePropertyGetEmissiveData ()=0
 Get the Emissive Data. More...
 
virtual IGamePropertyGetSpecularData ()=0
 Get the Specular Data. More...
 
virtual IGamePropertyGetOpacityData ()=0
 Get the Opacity Data. More...
 
virtual IGamePropertyGetGlossinessData ()=0
 Get the Glossiness Data. More...
 
virtual IGamePropertyGetSpecularLevelData ()=0
 Get the Specular Level Data. More...
 
virtual IGamePropertyGetEmissiveAmtData ()=0
 Get the Emissive Amount Data. More...
 
virtual int GetNumberOfTextureMaps ()=0
 Get the number of Textures used by the material. More...
 
virtual IGameTextureMapGetIGameTextureMap (int index)=0
 Access to the actual Texture Map. More...
 
virtual MtlGetMaxMaterial ()=0
 Access to the actual 3ds Max material definition. More...
 
- Public Member Functions inherited from IExportEntity
virtual ~IExportEntity ()
 Destructor. More...
 
virtual IPropertyContainerGetIPropertyContainer ()
 Retrieve the Property Container. More...
 
virtual bool IsEntitySupported ()
 Is the Entity directly supported. More...
 
virtual const MCHARGetClassName ()=0
 Retrieves the name of the entity class. 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...
 

Member Function Documentation

virtual bool IsMultiType ( )
pure virtual

Check if the material is a Multi Material type.

This could be for a Blend or Mix material

Returns
TRUE if is Multi material
virtual bool IsSubObjType ( )
pure virtual

Check if the material is a SubObject style Multi Material.

This could be for 3ds Max's Multi Subobject material

Returns
TRUE is a Subobject material
virtual const MCHAR* GetMaterialName ( )
pure virtual

Get the material name as seen in the Material Editor.

Returns
The name of the material
virtual const MCHAR* GetMaterialClass ( )
pure virtual

Get the material class as seen in the Material Editor.

Returns
The name of the material class
virtual int GetSubMaterialCount ( )
pure virtual

Get the number of sub materials.

The value is used by IGameScene::GetSubMaterial

Returns
The number of Sub material
See also
IGameScene::GetSubMaterial
virtual IGameMaterial* GetSubMaterial ( int  index)
pure virtual

Access to any sub material.

The sub material is any material used by a multi material. For example, a Top/Bottom material the sub materials would be the top and bottom

Parameters
indexIndex into the submaterial
Returns
A Pointer to a IGameMaterial
See also
IGameMaterial, IGameScene::GetRootMaterial
virtual int GetMaterialID ( int  subIndex)
pure virtual

Get the MatID for subobject materials.

This value represents the MatID used on objects to define what faces receive this material

Parameters
subIndexThe index of the submaterial to retrieve
Returns
The MatID of the material
virtual IGameProperty* GetAmbientData ( )
pure virtual

Get the Ambient Data.

Returns
A pointer to IGameProperty
virtual IGameProperty* GetDiffuseData ( )
pure virtual

Get the Diffuse Data.

Returns
A pointer to IGameProperty
virtual IGameProperty* GetEmissiveData ( )
pure virtual

Get the Emissive Data.

Returns
A pointer to IGameProperty
virtual IGameProperty* GetSpecularData ( )
pure virtual

Get the Specular Data.

Returns
A pointer to IGameProperty
virtual IGameProperty* GetOpacityData ( )
pure virtual

Get the Opacity Data.

Returns
A pointer to IGameProperty
virtual IGameProperty* GetGlossinessData ( )
pure virtual

Get the Glossiness Data.

Returns
A pointer to IGameProperty
virtual IGameProperty* GetSpecularLevelData ( )
pure virtual

Get the Specular Level Data.

Returns
A pointer to IGameProperty
virtual IGameProperty* GetEmissiveAmtData ( )
pure virtual

Get the Emissive Amount Data.

Returns
A pointer to IGameProperty
virtual int GetNumberOfTextureMaps ( )
pure virtual

Get the number of Textures used by the material.

Returns
The texture count.
virtual IGameTextureMap* GetIGameTextureMap ( int  index)
pure virtual

Access to the actual Texture Map.

Parameters
indexThe index to the Texture Map to retrieve
Returns
A pointer to a IGameTextureMap
virtual Mtl* GetMaxMaterial ( )
pure virtual

Access to the actual 3ds Max material definition.

This allows developer access to the complete 3ds Max material if further data access is needed

Returns
A pointer to a standard max Mtl class