CrystalSpace

Public API Reference

CS::Material::MaterialBuilder Class Reference

Tools related to creating materials. More...

#include <cstool/materialbuilder.h>

List of all members.

Static Public Member Functions

static iMaterialWrapperCreateColorMaterial (iObjectRegistry *object_reg, const char *matname, csColor color)
 Create a material from a color.
static iMaterialWrapperCreateParallaxMaterial (iObjectRegistry *object_reg, const char *matname, const char *matfile, const char *normalfile, const char *heightfile, const csVector4 &specular)
 Load a material, a normalmap texture, and a heightmap texture and setup a parallax material from that.
static void SetupParallaxMaterial (iObjectRegistry *object_reg, iMaterialWrapper *material, iTextureHandle *normalmap, iTextureHandle *heightmap, const csVector4 &specular)
 Set up an already loaded material for parallax mapping with previously loaded normalmap and heightmap textures.

Detailed Description

Tools related to creating materials.

Definition at line 42 of file materialbuilder.h.


Member Function Documentation

static iMaterialWrapper* CS::Material::MaterialBuilder::CreateColorMaterial ( iObjectRegistry object_reg,
const char *  matname,
csColor  color 
) [static]

Create a material from a color.

The material will be composed of a single texture with size 1x1 pixel of the given color. If there is already a material in the engine with the given 'matname' then the material will not be loaded again.

static iMaterialWrapper* CS::Material::MaterialBuilder::CreateParallaxMaterial ( iObjectRegistry object_reg,
const char *  matname,
const char *  matfile,
const char *  normalfile,
const char *  heightfile,
const csVector4 specular 
) [static]

Load a material, a normalmap texture, and a heightmap texture and setup a parallax material from that.

Returns 0 if the material could not be created. If there is already a material in the engine with the given 'matname' then the material will not be loaded again.

static void CS::Material::MaterialBuilder::SetupParallaxMaterial ( iObjectRegistry object_reg,
iMaterialWrapper material,
iTextureHandle normalmap,
iTextureHandle heightmap,
const csVector4 specular 
) [static]

Set up an already loaded material for parallax mapping with previously loaded normalmap and heightmap textures.


The documentation for this class was generated from the following file:

Generated for Crystal Space 2.1 by doxygen 1.6.1