Public Member Functions

IGameMaterial Class Reference

This reference page is linked to from the following overview topics: 3DXI Property Containers, 3DXI Scene, 3DXI Materials and Textures.


Search for all occurrences

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

#include <IGameMaterial.h>

Inheritance diagram for IGameMaterial:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual bool  IsMultiType ()=0
  Check if the material is a Multi Material type.
virtual bool  IsSubObjType ()=0
  Check if the material is a SubObject style Multi Material.
virtual MCHAR *  GetMaterialName ()=0
  Get the material name as seen in the Material Editor.
virtual MCHAR *  GetMaterialClass ()=0
  Get the material class as seen in the Material Editor.
virtual int  GetSubMaterialCount ()=0
  Get the number of sub materials.
virtual IGameMaterial GetSubMaterial (int index)=0
  Access to any sub material.
virtual int  GetMaterialID (int subIndex)=0
  Get the MatID for subobject materials.
virtual IGameProperty GetAmbientData ()=0
  Get the Ambient Data.
virtual IGameProperty GetDiffuseData ()=0
  Get the Diffuse Data.
virtual IGameProperty GetEmissiveData ()=0
  Get the Emissive Data.
virtual IGameProperty GetSpecularData ()=0
  Get the Specular Data.
virtual IGameProperty GetOpacityData ()=0
  Get the Opacity Data.
virtual IGameProperty GetGlossinessData ()=0
  Get the Glossiness Data.
virtual IGameProperty GetSpecularLevelData ()=0
  Get the Specular Level Data.
virtual IGameProperty GetEmissiveAmtData ()=0
  Get the Emissive Amount Data.
virtual int  GetNumberOfTextureMaps ()=0
  Get the number of Textures used by the material.
virtual IGameTextureMap GetIGameTextureMap (int index)=0
  Access to the actual Texture Map.
virtual Mtl GetMaxMaterial ()=0
  Access to the actual 3ds Max material definition.
virtual IGameFX GetIGameFX ()=0
  Access the D3D effect interface for the material.

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 MCHAR* GetMaterialName ( ) [pure virtual]

Get the material name as seen in the Material Editor.

Returns:
The name of the material
virtual 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:
index Index 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:
subIndex The 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:
index The 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
virtual IGameFX* GetIGameFX ( ) [pure virtual]

Access the D3D effect interface for the material.

This can be NULL if the material does not support effects - currently only the StdMtl2 and DxMaterial are supported


IGameMaterial IGameMaterial IGameMaterial IGameMaterial IGameMaterial IGameMaterial IGameMaterial IGameMaterial IGameMaterial IGameMaterial
IGameMaterial IGameMaterial IGameMaterial IGameMaterial IGameMaterial IGameMaterial IGameMaterial IGameMaterial IGameMaterial IGameMaterial