Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csMaterial Class Reference

A material class. More...

#include <material.h>

Inheritance diagram for csMaterial:

iMaterial iBase List of all members.

Public Methods

 csMaterial ()
 create an empty material.

 csMaterial (iTextureWrapper *txt)
 create a material with only the texture given.

virtual ~csMaterial ()
 destroy material.

csRGBcolorGetFlatColor ()
 Get the flat shading color.

float GetDiffuse () const
 Get diffuse reflection constant for the material.

void SetDiffuse (float val)
 Set diffuse reflection constant for the material.

float GetAmbient () const
 Get ambient lighting for the material.

void SetAmbient (float val)
 Set ambient lighting for the material.

float GetReflection () const
 Get reflection of the material.

void SetReflection (float val)
 Set reflection of the material.

iTextureWrapperGetTextureWrapper () const
 Get the texture (if none NULL is returned).

void SetTextureWrapper (iTextureWrapper *tex)
 Set the texture (pass NULL to set no texture).

void AddTextureLayer (iTextureWrapper *txtwrap, uint mode, float uscale, float vscale, float ushift, float vshift)
 Add a texture layer (currently only one supported).

virtual iTextureHandleGetTexture ()
 Get texture.

virtual int GetTextureLayerCount ()
 Get num texture layers.

virtual csTextureLayerGetTextureLayer (int idx)
 Get a texture layer.

virtual void GetFlatColor (csRGBpixel &oColor)
 Get flat color.

virtual void SetFlatColor (const csRGBcolor &col)
 Set the flat shading color.

virtual void GetReflection (float &oDiffuse, float &oAmbient, float &oReflection)
 Get reflection values (diffuse, ambient, reflection).

virtual void SetReflection (float oDiffuse, float oAmbient, float oReflection)
 Set reflection values (diffuse, ambient, reflection).

Public Attributes


Detailed Description

A material class.

The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000