CS::Material::MaterialBuilder Class Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Static Public Member Functions
CS::Material::MaterialBuilder Class Reference

Tools related to creating materials. More...

`#include <cstool/materialbuilder.h>`

List of all members.

## Static Public Member Functions
static iMaterialWrapper * | CreateColorMaterial (iObjectRegistry *object_reg, const char *matname, csColor color)
| Create a material from a color.
static iMaterialWrapper * | CreateParallaxMaterial (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:

- cstool/materialbuilder.h