Main Page   Class Hierarchy   Compound List   File List   Compound Members  

iMaterial Struct Reference

This class represents a material as seen from the engine view. More...

#include <material.h>

Inheritance diagram for iMaterial:

iBase csMaterial List of all members.

Public Methods

virtual iTextureHandleGetTexture ()=0
 Get the base texture from the material.

virtual int GetTextureLayerCount ()=0
 Get the number of texture layers. More...

virtual csTextureLayerGetTextureLayer (int idx)=0
 Get a texture layer.

virtual void GetFlatColor (csRGBpixel &oColor)=0
 Get the flat color. More...

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

virtual void GetReflection (float &oDiffuse, float &oAmbient, float &oReflection)=0
 Get light reflection parameters for this material.

virtual void SetReflection (float oDiffuse, float oAmbient, float oReflection)=0
 Set the reflection parameters.

Detailed Description

This class represents a material as seen from the engine view.

You need to register this to the texture manager to get a handle to an internal compiled material. This interface plays same role related to iMaterialHandle as iImage plays related to iTextureHandle.

Member Function Documentation

void iMaterial::GetFlatColor ( csRGBpixel & oColor ) [pure virtual]

Get the flat color.

If the material has a texture assigned, this will return the mean texture color.

Reimplemented in csMaterial.

int iMaterial::GetTextureLayerCount ( ) [pure virtual]

Get the number of texture layers.

The base texture is not counted in this.

Reimplemented in csMaterial.

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