3ds Max C++ API Reference
IGameMaterial Class Referenceabstract

Simple wrapper for 3ds Max materials. More...

#include <IGameMaterial.h>

+ 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...
 
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...
 

Detailed 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

Member Function Documentation

◆ IsMultiType()

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

◆ IsSubObjType()

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

◆ GetMaterialName()

virtual const MCHAR* GetMaterialName ( )
pure virtual

Get the material name as seen in the Material Editor.

Returns
The name of the material

◆ GetMaterialClass()

virtual const MCHAR* GetMaterialClass ( )
pure virtual

Get the material class as seen in the Material Editor.

Returns
The name of the material class

◆ GetSubMaterialCount()

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

◆ 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

◆ GetMaterialID()

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

◆ GetAmbientData()

virtual IGameProperty* GetAmbientData ( )
pure virtual

Get the Ambient Data.

Returns
A pointer to IGameProperty

◆ GetDiffuseData()

virtual IGameProperty* GetDiffuseData ( )
pure virtual

Get the Diffuse Data.

Returns
A pointer to IGameProperty

◆ GetEmissiveData()

virtual IGameProperty* GetEmissiveData ( )
pure virtual

Get the Emissive Data.

Returns
A pointer to IGameProperty

◆ GetSpecularData()

virtual IGameProperty* GetSpecularData ( )
pure virtual

Get the Specular Data.

Returns
A pointer to IGameProperty

◆ GetOpacityData()

virtual IGameProperty* GetOpacityData ( )
pure virtual

Get the Opacity Data.

Returns
A pointer to IGameProperty

◆ GetGlossinessData()

virtual IGameProperty* GetGlossinessData ( )
pure virtual

Get the Glossiness Data.

Returns
A pointer to IGameProperty

◆ GetSpecularLevelData()

virtual IGameProperty* GetSpecularLevelData ( )
pure virtual

Get the Specular Level Data.

Returns
A pointer to IGameProperty

◆ GetEmissiveAmtData()

virtual IGameProperty* GetEmissiveAmtData ( )
pure virtual

Get the Emissive Amount Data.

Returns
A pointer to IGameProperty

◆ GetNumberOfTextureMaps()

virtual int GetNumberOfTextureMaps ( )
pure virtual

Get the number of Textures used by the material.

Returns
The texture count.

◆ GetIGameTextureMap()

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

◆ GetMaxMaterial()

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