- CS
- Lighting
- SimpleStaticLighter
![]() |
Public API 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>
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. |
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.
Specify what type of shadows we want here.
Definition at line 53 of file simplestaticlighter.h.
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.