MAXMultiMaterial

This class manages state for surface materials, including standard material properties such as ambient, diffuse, specular, and layered textures.

Note: For textures, MAXMultiMaterial manages only an array of pointers and a count of active layers and doesn't worry about the mode of application of the layers. Each texture must be initialized properly to blend or modulate the layers below it. Most common usage for textures should be through the AddTexture() / RemoveTexture() / GetTexture() interface. The textures in the array are owned elsewhere and are assigned as pointers to become "layers". Therefore, this class performs no allocation / deallocation of texture objects.

When to Use

This class is used by the MAXExporter class.

Interface Methods

Description

MAXMultiMaterial

Class constructor

~MAXMultiMaterial

Class destructor

SetName

Sets the name of the MAXMultiMaterial object

GetName

Returns the material name

SetAmbient

Sets the ambient component

SetDiffuse

Sets the diffuse component

SetSpecular

Sets the specular component

SetSelfIllum

Sets the self-illumination component

SetShininess

Sets the shininess component

SetOpacity

Sets the overall opacity

SetShininessStrength

Sets the shininess strength

SetAmbientPercent

Sets the ambient strength

GetAmbient

Returns the ambient component

GetDiffuse

Returns the diffuse component

GetSpecular

Returns the specular component

GetSelfIllum

Returns the self-illumination component

GetShininess

Returns the shininess component

GetOpacity

Returns the opacity component

GetShininessStrength

Returns the shininess strength

GetAmbientPercent

Returns the ambient strength

SetSelfIllumColorOn

Sets self-illumination state to on or off

GetSelfIllumColorOn

Returns whether self-illumination state is on or off

GetBitmap

Returns the bitmap associated with a channel

GetTexmap

Returns the texmap associated with a channel

GetKeyTexName

Returns the key name for a texture

GetMAXTexName

Returns the internal MAX name for a texture

GetTexturePercent

Returns the texture modulation intensity for a texture

IsTexMapRenderable

Status of whether or not a given texture map is renderable

SetKeyTexName

Sets the key name for a texture

SetMAXTexName

Sets the internal MAX name for a texture

SetTexMap

Sets the texmap associated with a channel

SetTexturePercent

Sets the texture modulation intensity for a texture


MAXMultiMaterial::MAXMultiMaterial()

This is the class destructor.

Parameters:

None

Return Values:

None


MAXMultiMaterial::~MAXMultiMaterial()

This is the class destructor.

Parameters:

None

Return Values:

None


MAXMultiMaterial::SetName (CIFXString *pName)

This method sets the name of the MAXMultiMaterial object.

Parameters:

pName

Name of the object

Return Values


MAXMultiMaterial::GetName ()

This method returns material name.

Parameters:

None

Return Values:

CIFXString


MAXMultiMaterial:: SetAmbient ( IFXVector4* pColor )

This method sets the ambient component.

Parameters:

pColor

Ambient color

Return Values:

None


MAXMultiMaterial::SetDiffuse ( IFXVector4* pColor )

This method sets the diffuse component.

Parameters:

pColor

Diffuse color

Return Values:

None


MAXMultiMaterial::SetSpecular ( IFXVector4* pColor )

This method sets the specular component.

Parameters:

pColor

Specular color

Return Values:

None


MAXMultiMaterial:: SetSelfIllum ( IFXVector4* pColor )

This method sets the self-illumination component.

Parameters:

pColor

Self-illumination color

Return Values:

None


MAXMultiMaterial::SetShininess ( F32 fShiny )

This method sets the shininess component.

Parameters:

fShiny

Shininess percentage

Return Values:

None


MAXMultiMaterial::SetOpacity ( F32 fOpac )

This method sets the overall opacity.

Parameters:

fOpac

Opacity percentage

Return Values:

None


MAXMultiMaterial::SetShininessStrength ( F32 fShinistr )

This method sets the shininess strength.

Parameters:

fShinistr

Shininess percentage

Return Values:

None


MAXMultiMaterial::SetAmbientPercent ( F32 fAmbPercent )

This method sets the ambient strength.

Parameters:

fAmbPercent

Ambient percentage

Return Values:

None


MAXMultiMaterial::GetAmbient ()

This method returns the ambient component.

Parameters:

None

Return Values:

IFXVector4


MAXMultiMaterial::GetDiffuse ()

This method returns the diffuse component.

Parameters:

None

Return Values:

IFXVector4


MAXMultiMaterial::GetSpecular ()

This method returns the specular component.

Parameters:

None

Return Values:

IFXVector4


MAXMultiMaterial::GetSelfIllum ()

This method returns the self-illumination component.

Parameters:

None

Return Values:

IFXVector4


MAXMultiMaterial::GetShininess ()

This method returns the shininess component.

Parameters:

None

Return Values:

F32


MAXMultiMaterial::GetOpacity ()

This method returns the opacity component.

Parameters:

None

Return Values:

F32


MAXMultiMaterial::GetShininessStrength ()

This method returns the shininess strength.

Parameters:

None

Return Values:

F32


MAXMultiMaterial::GetAmbientPercent ()

This method returns the ambient strength.

Parameters:

None

Return Values:

F32


MAXMultiMaterial::SetSelfIllumColorOn ( BOOL bIsOn )

This method sets self-illumination state to on or off.

Parameters:

bIsOn

Returns True if self-illumination is turned on, otherwise it returns False

Return Values:

None


MAXMultiMaterial::GetSelfIllumColorOn ( )

This method determines whether self-illumination is on or off.

Parameters:

None

Return Values:

BOOL


MAXMultiMaterial::GetBitmap ( TEXTURE_CHANNEL InTextureChannel, Bitmap** ppBitmap )

This method returns the bitmap associated with a given channel.

Parameters:

InTextureChannel

Specifies texture channel

ppBitmap

The bitmap

Return Values


MAXMultiMaterial:: GetTexMap ( TEXTURE_CHANNEL InTextureChannel, Texmap** ppTexmap )

This method returns the texmap associated with a given channel.

Parameters:

InTextureChannel

Specifies texture channel

ppTexmap

The texture map

Return Values


MAXMultiMaterial:: GetKeyTexName ( TEXTURE_CHANNEL InTextureChannel, CIFXString *pName )

This method returns the key (unique) name for a given texture. In MAX, a standard texture consists of an internal, but not necessarily unique name and an external, unique name.

Parameters:

InTextureChannel

Specifies texture channel

pName

The key name

Return Values


MAXMultiMaterial:: GetMAXTexName ( TEXTURE_CHANNEL InTextureChannel, CIFXString *pName )

This method returns the internal MAX name associated with a texture.

Parameters:

InTextureChannel

Specifies texture channel

pName

The texture name

Return Values


MAXMultiMaterial:: GetTexturePercent ( TEXTURE_CHANNEL InTextureChannel, F32* pPercent )

This method returns the texture modulation intensity for a texture of a given channel.

Parameters:

InTextureChannel

Specifies texture channel

pPercent

The texture intensity

Return Values


MAXMultiMaterial:: IsTexMapRenderable ( TEXTURE_CHANNEL InTextureChannel, BOOL* pIsRenderable )

This method the status of whether or not a given texture map is renderable.

Parameters:

InTextureChannel

Specifies texture channel

pIsRenderable

Status specifying whether texture is renderable

Return Values


MAXMultiMaterial:: SetKeyTexName ( TEXTURE_CHANNEL InTextureChannel, CIFXString *pName )

This method sets the key (unique) name for a given texture. In MAX, a standard texture consists of an internal, but not necessarily unique name and an external, unique name.

Parameters:

InTextureChannel

The texture channel

pName

The name of the texture

Return Values


MAXMultiMaterial:: SetMAXTexName ( TEXTURE_CHANNEL InTextureChannel, CIFXString *pName )

This method sets the internal MAX name associated with a texture.

Parameters:

InTextureChannel

The texture channel

pName

The name of the texture

Return Values


MAXMultiMaterial:: SetTexMap ( TEXTURE_CHANNEL InTextureChannel, Texmap* pTexmap )

This method sets the texmap associated with a given channel.

Parameters:

InTextureChannel

The texture channel

pTexmap

The texture map

Return Values


MAXMultiMaterial::SetTexturePercent ( TEXTURE_CHANNEL InTextureChannel, F32 fPercent )

This method sets the texture modulation intensity for a texture of a given channel.

Parameters:

InTextureChannel

The texture channel

fPercent

The texture intensity

Return Values

 

§See asterisked (*) statement at Legal Information © 2001 Intel Corporation.