Public Member Functions | Public Attributes

Material Class Reference

This reference page is linked to from the following overview topics: Animatables and Sub-Animatables.


Search for all occurrences

Detailed Description

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

Description:
This class describes the properties of a material used by the interactive renderer.
Data Members:
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.

#include <mtl.h>

Inheritance diagram for Material:
Inheritance graph
[legend]

List of all members.

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)

Public Attributes

Point3  Ka
Point3  Kd
Point3  Ks
float  shininess
float  shinStrength
float  opacity
float  selfIllum
int  dblSided
int  shadeLimit
Tab< TextureInfo texture

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]
Remarks:
This method returns a pointer to the BaseInterface of the specified interface.
Parameters:
Interface_ID id

The interface ID for which to return the BaseInterface.

Reimplemented from BaseInterfaceServer.


Member Data Documentation

float shininess
float shinStrength
float opacity
float selfIllum
int dblSided

Material Material Material Material Material Material Material Material Material Material
Material Material Material Material Material Material Material Material Material Material