Public Member Functions

StdMat Class Reference

This reference page is linked to from the following overview topics: Accessing Material Properties.


Search for all occurrences

Detailed Description

See also:
Class Mtl, Class Color, Working with Materials.

Description:
This class provides access to the properties of the 3ds Max Standard material. All methods of this class are implemented by the system.

Note that some properties such as the texture maps used are accessed using methods of the base class MtlBase. See that class, or the Advanced Topics section Working with Materials for more details.
Method Groups:
See Method Groups for Class StdMat.

#include <stdmat.h>

Inheritance diagram for StdMat:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void  SetSoften (BOOL onoff)=0
virtual void  SetFaceMap (BOOL onoff)=0
virtual void  SetTwoSided (BOOL onoff)=0
virtual void  SetWire (BOOL onoff)=0
virtual void  SetWireUnits (BOOL onOff)=0
virtual void  SetFalloffOut (BOOL onOff)=0
virtual void  SetTransparencyType (int type)=0
virtual void  SetAmbient (Color c, TimeValue t)=0
virtual void  SetDiffuse (Color c, TimeValue t)=0
virtual void  SetSpecular (Color c, TimeValue t)=0
virtual void  SetFilter (Color c, TimeValue t)=0
virtual void  SetShininess (float v, TimeValue t)=0
virtual void  SetShinStr (float v, TimeValue t)=0
virtual void  SetSelfIllum (float v, TimeValue t)=0
virtual void  SetOpacity (float v, TimeValue t)=0
virtual void  SetOpacFalloff (float v, TimeValue t)=0
virtual void  SetWireSize (float s, TimeValue t)=0
virtual void  SetIOR (float v, TimeValue t)=0
virtual void  LockAmbDiffTex (BOOL onOff)=0
virtual void  SetSamplingOn (BOOL on)=0
virtual BOOL  GetSamplingOn ()=0
virtual void  SetShading (int s)=0
virtual int  GetShading ()=0
virtual void  EnableMap (int id, BOOL onoff)=0
virtual BOOL  MapEnabled (int id)=0
virtual void  SetTexmapAmt (int id, float amt, TimeValue t)=0
virtual float  GetTexmapAmt (int id, TimeValue t)=0
virtual BOOL  GetSoften ()=0
virtual BOOL  GetFaceMap ()=0
virtual BOOL  GetTwoSided ()=0
virtual BOOL  GetWire ()=0
virtual BOOL  GetWireUnits ()=0
virtual BOOL  GetFalloffOut ()=0
virtual int  GetTransparencyType ()=0
virtual Color  GetAmbient (TimeValue t)=0
virtual Color  GetDiffuse (TimeValue t)=0
virtual Color  GetSpecular (TimeValue t)=0
virtual Color  GetFilter (TimeValue t)=0
virtual float  GetShininess (TimeValue t)=0
virtual float  GetShinStr (TimeValue t)=0
virtual float  GetSelfIllum (TimeValue t)=0
virtual float  GetOpacity (TimeValue t)=0
virtual float  GetOpacFalloff (TimeValue t)=0
virtual float  GetWireSize (TimeValue t)=0
virtual float  GetIOR (TimeValue t)=0
virtual BOOL  GetAmbDiffTexLock ()=0

Member Function Documentation

virtual void SetSoften ( BOOL  onoff ) [pure virtual]
Remarks:
Sets the 'Soften' setting on or off.
Parameters:
BOOL onoff

TRUE to turn on; FALSE to turn off.
virtual void SetFaceMap ( BOOL  onoff ) [pure virtual]
Remarks:
Sets the 'Face Map' setting on or off.
Parameters:
BOOL onoff

TRUE to turn on; FALSE to turn off.
virtual void SetTwoSided ( BOOL  onoff ) [pure virtual]
Remarks:
Sets the '2 Sided' setting on or off.
Parameters:
BOOL onoff

TRUE to turn on; FALSE to turn off.
virtual void SetWire ( BOOL  onoff ) [pure virtual]
Remarks:
Sets the 'Wire' setting on or off.
Parameters:
BOOL onoff

TRUE to turn on; FALSE to turn off.
virtual void SetWireUnits ( BOOL  onOff ) [pure virtual]
Remarks:
Sets the wire size to pixels or units.
Parameters:
BOOL onoff

TRUE for units; FALSE for pixels.
virtual void SetFalloffOut ( BOOL  onOff ) [pure virtual]
Remarks:
Sets the opacity falloff setting to out or in.
Parameters:
BOOL onoff

TRUE for Out; FALSE for In.
virtual void SetTransparencyType ( int  type ) [pure virtual]
Remarks:
Sets the additive transparency setting.
Parameters:
int type

One of the following values:

TRANSP_SUBTRACTIVE

TRANSP_ADDITIVE

TRANSP_FILTER
virtual void SetAmbient ( Color  c,
TimeValue  t 
) [pure virtual]
Remarks:
Sets the ambient color to the specified value at the time passed.
Parameters:
Color c

The color to set.

TimeValue t

The time at which to set the value.

Implements Mtl.

virtual void SetDiffuse ( Color  c,
TimeValue  t 
) [pure virtual]
Remarks:
Sets the diffuse color to the specified value at the time passed.
Parameters:
Color c

The color to set.

TimeValue t

The time at which to set the value.

Implements Mtl.

virtual void SetSpecular ( Color  c,
TimeValue  t 
) [pure virtual]
Remarks:
Sets the specular color to the specified value at the time passed.
Parameters:
Color c

The color to set.

TimeValue t

The time at which to set the value.

Implements Mtl.

virtual void SetFilter ( Color  c,
TimeValue  t 
) [pure virtual]
Remarks:
Sets the filter color to the specified value at the time passed.
Parameters:
Color c

The color to set.

TimeValue t

The time at which to set the value.
virtual void SetShininess ( float  v,
TimeValue  t 
) [pure virtual]
Remarks:
Sets the shininess to the specified value at the time passed.
Parameters:
float v

The value to set in the range 0 - 1.

TimeValue t

The time at which to set the value.

Implements Mtl.

virtual void SetShinStr ( float  v,
TimeValue  t 
) [pure virtual]
Remarks:
Sets the shininess strength to the specified value at the time passed.
Parameters:
float v

The value to set in the range 0 - 1.

TimeValue t

The time at which to set the value.
virtual void SetSelfIllum ( float  v,
TimeValue  t 
) [pure virtual]
Remarks:
Sets the self illumination to the specified value at the time passed.
Parameters:
float v

The value to set in the range 0 - 1.

TimeValue t

The time at which to set the value.
virtual void SetOpacity ( float  v,
TimeValue  t 
) [pure virtual]
Remarks:
Sets the opacity to the specified value at the time passed.
Parameters:
float v

The value to set in the range 0 - 1.

TimeValue t

The time at which to set the value.
virtual void SetOpacFalloff ( float  v,
TimeValue  t 
) [pure virtual]
Remarks:
Sets the opacity falloff to the specified value at the time passed.
Parameters:
float v

The value to set in the range 0 - 1.

TimeValue t

The time at which to set the value.
virtual void SetWireSize ( float  s,
TimeValue  t 
) [pure virtual]
Remarks:
Sets the wire size to the specified value at the time passed.
Parameters:
float s

The value to set. This value should be > 0.

TimeValue t

The time at which to set the value.
virtual void SetIOR ( float  v,
TimeValue  t 
) [pure virtual]
Remarks:
Sets the index of refraction to the specified value at the time passed.
Parameters:
float v

The value to set in the range 0 - 10.

TimeValue t

The time at which to set the value.
virtual void LockAmbDiffTex ( BOOL  onOff ) [pure virtual]
Remarks:
Locks or unlocks the ambient/diffuse textures together.
Parameters:
BOOL onOff

TRUE to lock; FALSE to unlock.
virtual void SetSamplingOn ( BOOL  on ) [pure virtual]
Remarks:
This method is available in release 3.0 and later only.

Set super sampling on or off (enabled or disabled).
Parameters:
BOOL on

TRUE for on; FALSE for off.
virtual BOOL GetSamplingOn ( ) [pure virtual]
virtual void SetShading ( int  s ) [pure virtual]
Remarks:
Sets the shading limit for the material.
Parameters:
int s

One of the following values:

SHADE_CONST

SHADE_PHONG

SHADE_METAL

SHADE_BLINN

Implemented in StdMat2.

virtual int GetShading ( ) [pure virtual]
Remarks:
Returns the shading limit. One of the following values:

SHADE_CONST

SHADE_PHONG

SHADE_METAL

SHADE_BLINN

Implemented in StdMat2.

virtual void EnableMap ( int  id,
BOOL  onoff 
) [pure virtual]
Remarks:
Enables or disables the specified map type.
Parameters:
int i

See List of Material Texture Map Indices. BOOL onoff

TRUE to enable; FALSE to disable.
virtual BOOL MapEnabled ( int  id ) [pure virtual]
Remarks:
Returns TRUE if the specified map is enabled; otherwise FALSE.
Parameters:
int i

See List of Material Texture Map Indices.
virtual void SetTexmapAmt ( int  id,
float  amt,
TimeValue  t 
) [pure virtual]
Remarks:
This method is used to change the 'Amount' setting of the specified map.
Parameters:
int imap

See List of Material Texture Map Indices. float amt

The amount to set in the range of 0-1.

TimeValue t

The time at which to set the amount.
virtual float GetTexmapAmt ( int  id,
TimeValue  t 
) [pure virtual]
Remarks:
Returns the amount setting of the specified texture map at the time passed. The returned range is 0 to 1.
Parameters:
int imap

See List of Material Texture Map Indices. TimeValue t

The amount at this time is returned.
virtual BOOL GetSoften ( ) [pure virtual]
Remarks:
Returns TRUE if soften is on; otherwise FALSE.
virtual BOOL GetFaceMap ( ) [pure virtual]
Remarks:
Returns TRUE if face mapping is on; otherwise FALSE.
virtual BOOL GetTwoSided ( ) [pure virtual]
Remarks:
Returns TRUE if two sided is on; otherwise FALSE.
virtual BOOL GetWire ( ) [pure virtual]
Remarks:
Returns TRUE if wire is on; otherwise FALSE.
virtual BOOL GetWireUnits ( ) [pure virtual]
Remarks:
Returns TRUE if the wire size is in units; FALSE if the wire size is in pixels.
virtual BOOL GetFalloffOut ( ) [pure virtual]
Remarks:
Returns the opacity falloff setting: 1 = Out, 0 = In.
virtual int GetTransparencyType ( ) [pure virtual]
Remarks:
Returns the transparency type.
Returns:
int type

One of the following values:

TRANSP_SUBTRACTIVE

TRANSP_ADDITIVE

TRANSP_FILTER
virtual Color GetAmbient ( TimeValue  t ) [pure virtual]
Remarks:
Returns the ambient color setting at the specified time.
Parameters:
TimeValue t

The time to return the color.
virtual Color GetDiffuse ( TimeValue  t ) [pure virtual]
Remarks:
Returns the diffuse color setting at the specified time.
Parameters:
TimeValue t

The time to return the color.
virtual Color GetSpecular ( TimeValue  t ) [pure virtual]
Remarks:
Returns the specular color setting at the specified time.
Parameters:
TimeValue t

The time to return the color.
virtual Color GetFilter ( TimeValue  t ) [pure virtual]
Remarks:
Returns the filter color setting at the specified time.
Parameters:
TimeValue t

The time to return the color.
virtual float GetShininess ( TimeValue  t ) [pure virtual]
Remarks:
Returns the shininess setting at the specified time.
Parameters:
TimeValue t

The value at this time is returned.
virtual float GetShinStr ( TimeValue  t ) [pure virtual]
Remarks:
Returns the shininess strength setting at the specified time.
Parameters:
TimeValue t

The value at this time is returned.
virtual float GetSelfIllum ( TimeValue  t ) [pure virtual]
Remarks:
Returns the self illumination setting at the specified time.
Parameters:
TimeValue t

The value at this time is returned.
virtual float GetOpacity ( TimeValue  t ) [pure virtual]
Remarks:
Returns the opacity setting at the specified time.
Parameters:
TimeValue t

The value at this time is returned.
virtual float GetOpacFalloff ( TimeValue  t ) [pure virtual]
Remarks:
Returns the opacity falloff setting at the specified time.
Parameters:
TimeValue t

The value at this time is returned.
virtual float GetWireSize ( TimeValue  t ) [pure virtual]
Remarks:
Returns the wire size setting at the specified time.
Parameters:
TimeValue t

The value at this time is returned.
virtual float GetIOR ( TimeValue  t ) [pure virtual]
Remarks:
Returns the index of refraction setting at the specified time.
Parameters:
TimeValue t

The value at this time is returned.
virtual BOOL GetAmbDiffTexLock ( ) [pure virtual]
Remarks:
Returns TRUE if the ambient-diffuse texture lock is set; otherwise FALSE.

StdMat StdMat StdMat StdMat StdMat StdMat StdMat StdMat StdMat StdMat
StdMat StdMat StdMat StdMat StdMat StdMat StdMat StdMat StdMat StdMat