CS::Lighting::SimpleStaticLighter 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

Public Types | Static Public Member Functions
CS::Lighting::SimpleStaticLighter Class Reference

The functions in this class all provide a simple way to initialize the "static color" of a mesh (usually genmesh) to provide a way to do simple static 'lighting'. More...

`#include <cstool/simplestaticlighter.h>`

List of all members.

## Public Types
enum | ShadowType { CS_SHADOW_NONE = 0, CS_SHADOW_CENTER, CS_SHADOW_BOUNDINGBOX, CS_SHADOW_FULL }
| Specify what type of shadows we want here. More...
## Static Public Member Functions
static void | ConstantColor (iMeshWrapper *mesh, const csColor4 &color)
| Fill the static color of the mesh with the given color.
static void | ShineLight (iMeshWrapper *mesh, iLight *light, ShadowType shadow_type=CS_SHADOW_NONE)
| Calculate lighting for this mesh as seen from the given light.
static void | ShineLights (iMeshWrapper *mesh, iEngine *engine, int maxlights, ShadowType shadow_type=CS_SHADOW_NONE)
| Calculate lighting for this mesh as seen from a specified number of lights that affect this mesh.
static void | ShineLights (iSector *sector, iEngine *engine, int maxlights, ShadowType shadow_type=CS_SHADOW_NONE)
| Calculate lighting for all meshes in this sector as seen from a specified number of lights that affect those meshes.

## Detailed Description

The functions in this class all provide a simple way to initialize the "static color" of a mesh (usually genmesh) to provide a way to do simple static 'lighting'.

Calling this function has the same effect as having a mesh which is staticly lit using vertex lighting through the lighter2 utility.

Definition at line 47 of file simplestaticlighter.h.

## Member Enumeration Documentation

enum CS::Lighting::SimpleStaticLighter::ShadowType

Specify what type of shadows we want here.

Enumerator:

  CS_SHADOW_NONE | No shadows.
  CS_SHADOW_CENTER | Only shadow based on center of object.
  CS_SHADOW_BOUNDINGBOX | Shadow based on the vertices of the bounding box of the object.
  CS_SHADOW_FULL | Shadow every individual vertex.

Definition at line 53 of file simplestaticlighter.h.

## Member Function Documentation

static void CS::Lighting::SimpleStaticLighter::ConstantColor | ( | iMeshWrapper * | mesh,
|  | const csColor4 & | color
| ) |  | `[static]`

Fill the static color of the mesh with the given color.

static void CS::Lighting::SimpleStaticLighter::ShineLight | ( | iMeshWrapper * | mesh,
|  | iLight * | light,
|  | ShadowType | shadow_type = `CS_SHADOW_NONE`
| ) |  | `[static]`

Calculate lighting for this mesh as seen from the given light.

static void CS::Lighting::SimpleStaticLighter::ShineLights | ( | iMeshWrapper * | mesh,
|  | iEngine * | engine,
|  | int | maxlights,
|  | ShadowType | shadow_type = `CS_SHADOW_NONE`
| ) |  | `[static]`

Calculate lighting for this mesh as seen from a specified number of lights that affect this mesh.

static void CS::Lighting::SimpleStaticLighter::ShineLights | ( | iSector * | sector,
|  | iEngine * | engine,
|  | int | maxlights,
|  | ShadowType | shadow_type = `CS_SHADOW_NONE`
| ) |  | `[static]`

Calculate lighting for all meshes in this sector as seen from a specified number of lights that affect those meshes.

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

- cstool/simplestaticlighter.h