Class Material

3DS Max Plug-In SDK

Class Material

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

class Material : public BaseInterfaceServer

Description:

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

Data Members:

public:

Point3 Ka;

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.

Point3 Kd;

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.

Point3 Ks;

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.

int shadeLimit;

Shading limit setting. See Rendering Limits.

Tab<TextureInfo> texture;

The table of textures used by this material.

Methods:

Prototype:

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);

Prototype:

~Material();

Remarks:

Class destructor.