CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

iMaterial Struct Reference
[3D]

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 void SetEffect (iEffectDefinition *ed)=0
 Set the material's effect. More...

virtual iEffectDefinitionGetEffect ()=0
 Get the effect from the material. More...

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

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

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

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

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

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

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


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.

Definition at line 69 of file ivideo/material.h.


Member Function Documentation

virtual iEffectDefinition* iMaterial::GetEffect   [pure virtual]
 

Get the effect from the material.

Implemented in csMaterial.

virtual void iMaterial::GetFlatColor csRGBpixel   oColor,
bool    useTextureMean = 1
[pure virtual]
 

Get the flat color.

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

Implemented in csMaterial.

virtual void iMaterial::GetReflection float &    oDiffuse,
float &    oAmbient,
float &    oReflection
[pure virtual]
 

Get light reflection parameters for this material.

Implemented in csMaterial.

virtual iTextureHandle* iMaterial::GetTexture   [pure virtual]
 

Get the base texture from the material.

Implemented in csMaterial.

virtual csTextureLayer* iMaterial::GetTextureLayer int    idx [pure virtual]
 

Get a texture layer.

Implemented in csMaterial.

virtual int iMaterial::GetTextureLayerCount   [pure virtual]
 

Get the number of texture layers.

The base texture is not counted in this.

Implemented in csMaterial.

virtual void iMaterial::SetEffect iEffectDefinition   ed [pure virtual]
 

Set the material's effect.

Implemented in csMaterial.

virtual void iMaterial::SetFlatColor const csRGBcolor   col [pure virtual]
 

Set the flat shading color.

Implemented in csMaterial.

virtual void iMaterial::SetReflection float    oDiffuse,
float    oAmbient,
float    oReflection
[pure virtual]
 

Set the reflection parameters.

Implemented in csMaterial.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14