Material Class Reference
 
 
 
Material Class Reference

This reference page is linked to from the following overview topics: Animatables and Sub-Animatables, Implementing Simple Material and Texture Map Plug-ins with Nitrous.


#include <mtl.h>

Inheritance diagram for Material:
BaseInterfaceServer InterfaceServer MaxHeapOperators

Class Description

The main material class definition.

This class describes the properties of a material used by the renderer.

See also:
Class TextureInfo, Template Class Tab, Class Point3, Rendering Limits.

Public Member Functions

DllExport  Material ()
virtual  ~Material ()
DllExport  Material (const Material &from)
  Copy constructor.
DllExport Material operator= (const Material &from)
  Assignment operator.
DllExport BaseInterface GetInterface (Interface_ID id)
  Gets the BaseInterface pointer.

Public Attributes

Point3  Ka
  Ambient color setting.
Point3  Kd
  Diffuse color setting.
Point3  Ks
  Specular color setting.
float  shininess
  Shininess setting. This value ranges from 0.0 to 1.0.
float  shinStrength
  Shininess strength setting. This value ranges from 0.0 to 1.0.
float  opacity
  Opacity setting. This value ranges from 0.0 to 1.0.
float  selfIllum
  Self Illumination setting. This value ranges from 0.0 to 1.0.
int  dblSided
  Double sided material setting. Nonzero indicates double sided material, otherwise single sided.
int  shadeLimit
  Shading limit setting. See Rendering Limits.
MaxSDK::Array< TextureInfo texture
  The textures used by this material.

Constructor & Destructor Documentation

DllExport Material ( )
Remarks:
Class constructor. The data members are initialized as follows:

Ka[0] = Ka[1] = Ka[2] = 0.3f;

Kd[0] = Kd[1] = Kd[2] = 0.9f;

Ks[0] = Ks[1] = Ks[2] = 0.9f;

shininess = 10.0f;

shinStrength = 1.0f;

opacity = 1.0f;

selfIllum = 0.0f;

dblSided = 0;

shadeLimit = 3;

TextureInfo texInfo;

texture.Append(1, &texInfo);
virtual ~Material ( ) [inline, virtual]
Remarks:
Class destructor.
{};
DllExport Material ( const Material from )

Copy constructor.

Parameters:
[in] from The object that will be copied.

Member Function Documentation

DllExport Material& operator= ( const Material from )

Assignment operator.

Parameters:
[in] from The object that will be copied.
DllExport BaseInterface* GetInterface ( Interface_ID  id ) [virtual]

Gets the BaseInterface pointer.

Reimplemented from BaseInterfaceServer.


Member Data Documentation

Ambient color setting.

The values for x, y, and z range from 0.0 to 1.0. These correspond to red, green, and blue respectively.

Diffuse color setting.

The values for x, y, and z range from 0.0 to 1.0. These correspond to red, green, and blue respectively.

Specular color setting.

The values for x, y, and z range from 0.0 to 1.0. These correspond to red, green, and blue respectively.

float shininess

Shininess setting. This value ranges from 0.0 to 1.0.

float shinStrength

Shininess strength setting. This value ranges from 0.0 to 1.0.

float opacity

Opacity setting. This value ranges from 0.0 to 1.0.

float selfIllum

Self Illumination setting. This value ranges from 0.0 to 1.0.

int dblSided

Double sided material setting. Nonzero indicates double sided material, otherwise single sided.

The textures used by this material.