Material Class Reference

#include <mtl.h>

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 Modes.
+ Inheritance diagram for Material:

Public Member Functions

DllExport Material ()
 
virtual ~Material ()
 
DllExport Material (const Material &from)
 Copy constructor. More...
 
DllExport Materialoperator= (const Material &from)
 Assignment operator. More...
 
DllExport BaseInterfaceGetInterface (Interface_ID id)
 Gets the BaseInterface pointer. More...
 
- Public Member Functions inherited from BaseInterfaceServer
virtual UtilExport int NumInterfaces () const
 
virtual UtilExport BaseInterfaceGetInterfaceAt (int i) const
 
virtual UtilExport ~BaseInterfaceServer ()
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 

Public Attributes

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

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
- Protected Attributes inherited from BaseInterfaceServer
Tab< BaseInterface * > interfaces
 

Constructor & Destructor Documentation

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 ( )
inlinevirtual
Remarks
Class destructor.
226 {};
DllExport Material ( const Material from)

Copy constructor.

Parameters
[in]fromThe object that will be copied.

Member Function Documentation

DllExport Material& operator= ( const Material from)

Assignment operator.

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

Gets the BaseInterface pointer.

Reimplemented from BaseInterfaceServer.

Member Data Documentation

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 Modes.

The textures used by this material.