CrystalSpace

Public API Reference

iMaterial Struct Reference
[3D3D]

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

#include <ivideo/material.h>

Inheritance diagram for iMaterial:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual void GetFlatColor (csRGBpixel &oColor, bool useTextureMean=true)=0
 Get the flat color.
virtual void GetReflection (float &oDiffuse, float &oAmbient, float &oReflection)=0
 Get light reflection parameters for this material.
virtual iShaderGetShader (csStringID type)=0
 Get shader associated with a shader type.
virtual const csHash< csRef<
iShader >, csStringID > & 
GetShaders () const =0
 Get all Shaders.
virtual iTextureHandleGetTexture (csStringID name)=0
 Get a texture from the material.
virtual iTextureHandleGetTexture ()=0
 Get the base texture from the material.
virtual void SetFlatColor (const csRGBcolor &col)=0
 Set the flat shading color.
virtual void SetReflection (float oDiffuse, float oAmbient, float oReflection)=0
 Set the reflection parameters.
virtual void SetShader (csStringID type, iShader *shader)=0
 Associate a shader with a shader type.

Detailed Description

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

Because it is also a shader variable context it can be used directly for rendering.

Main creators of instances implementing this interface:

Main ways to get pointers to this interface:

Main users of this interface:

Definition at line 72 of file material.h.


Member Function Documentation

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

Get the flat color.

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

Deprecated:
Use the shader variable system instead.

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

Get light reflection parameters for this material.

Deprecated:
Use the shader variable system instead.

virtual iShader* iMaterial::GetShader csStringID  type  )  [pure virtual]
 

Get shader associated with a shader type.

virtual const csHash<csRef<iShader>, csStringID>& iMaterial::GetShaders  )  const [pure virtual]
 

Get all Shaders.

virtual iTextureHandle* iMaterial::GetTexture csStringID  name  )  [pure virtual]
 

Get a texture from the material.

virtual iTextureHandle* iMaterial::GetTexture  )  [pure virtual]
 

Get the base texture from the material.

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

Set the flat shading color.

Deprecated:
Use the shader variable system instead.

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

Set the reflection parameters.

Deprecated:
Use the shader variable system instead.

virtual void iMaterial::SetShader csStringID  type,
iShader shader
[pure virtual]
 

Associate a shader with a shader type.


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