CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Lighting
[Crystal Space 3D Engine]


Compounds

struct  iBaseHalo
 This is the basic interface for all types of halos. More...

struct  iCrossHalo
 This is a halo which resembles a cross. More...

struct  iFlareHalo
 This is a halo which resembles a (solar) flare. More...

struct  iLight
 The iLight interface is the SCF interface for the csLight class. More...

struct  iLightCallback
 Set a callback which is called when this light color is changed. More...

struct  iLightingProcessData
 The iLightingProcessData interface can be implemented by a mesh object so that it can attach additional information for the lighting process. More...

struct  iLightingProcessInfo
 The iLightingProcessInfo interface holds information for the lighting system. More...

struct  iLightIterator
 Iterator to iterate over all static lights in the engine. More...

struct  iLightList
 This structure represents a list of lights. More...

struct  iLightManager
 An engine (3D or iso) can implement this interface for the benefit of mesh objects so that they can request lighting information from the engine. More...

struct  iNovaHalo
 This is a halo which resembles a nova. More...

struct  iShadowBlock
 A block of shadows represent the shadows that are casted by one iShadowCaster object. More...

struct  iShadowBlockList
 This is a list of shadow blocks. More...

struct  iShadowCaster
 An object that can cast shadows. More...

struct  iShadowIterator
 A shadow iterator allows someone to iterate over all shadows in a iShadowBlock or iShadowBlockList. More...

struct  iShadowReceiver
 An object that is interested in getting shadow information. More...


Light flags

#define CS_LIGHT_THINGSHADOWS   0x00000001
 If CS_LIGHT_THINGSHADOWS is set for a light then things will also cast shadows.

#define CS_LIGHT_ACTIVEHALO   0x80000000
 If this flag is set, the halo for this light is active and is in the engine's queue of active halos.


Light Dynamic Types

#define CS_LIGHT_DYNAMICTYPE_STATIC   1
 A fully static light.

#define CS_LIGHT_DYNAMICTYPE_PSEUDO   2
 A pseudo-dynamic light.

#define CS_LIGHT_DYNAMICTYPE_DYNAMIC   3
 A fully dynamic light.


Attenuation modes

Attenuation controls how the brightness of a light fades with distance.

There are five attenuation formulas:

  • no attenuation = light * 1
  • linear attenuation = light * (radius - distance) / radius
  • inverse attenuation = light * (radius / distance)
  • realistic attenuation = light * (radius^2 / distance^2)
  • using clq attenuation vector (prefered for lighting with new renderer)


#define CS_ATTN_NONE   0
 no attenuation: light * 1

#define CS_ATTN_LINEAR   1
 linear attenuation: light * (radius - distance) / radius

#define CS_ATTN_INVERSE   2
 inverse attenuation: light * (radius / distance)

#define CS_ATTN_REALISTIC   3
 realistic attenuation: light * (radius^2 / distance^2)

#define CS_ATTN_CLQ   4
 using clq attenuation


Defines

#define CS_DEFAULT_LIGHT_LEVEL   20
 Light level that is used when there is no light on the texture.

#define CS_NORMAL_LIGHT_LEVEL   128
 Light level that corresponds to a normally lit texture.


Enumerations

enum  csHaloType { cshtCross, cshtNova, cshtFlare }
 The possible halo-types. More...


Define Documentation

#define CS_ATTN_CLQ   4
 

using clq attenuation

Definition at line 109 of file light.h.

#define CS_ATTN_INVERSE   2
 

inverse attenuation: light * (radius / distance)

Definition at line 105 of file light.h.

#define CS_ATTN_LINEAR   1
 

linear attenuation: light * (radius - distance) / radius

Definition at line 103 of file light.h.

#define CS_ATTN_NONE   0
 

no attenuation: light * 1

Definition at line 101 of file light.h.

#define CS_ATTN_REALISTIC   3
 

realistic attenuation: light * (radius^2 / distance^2)

Definition at line 107 of file light.h.

#define CS_DEFAULT_LIGHT_LEVEL   20
 

Light level that is used when there is no light on the texture.

Definition at line 85 of file light.h.

#define CS_LIGHT_ACTIVEHALO   0x80000000
 

If this flag is set, the halo for this light is active and is in the engine's queue of active halos.

When halo become inactive, this flag is reset.

Definition at line 57 of file light.h.

#define CS_LIGHT_DYNAMICTYPE_DYNAMIC   3
 

A fully dynamic light.

No shadows are calculated unless you use a shader/renderloop that does that in hardware.

Definition at line 81 of file light.h.

#define CS_LIGHT_DYNAMICTYPE_PSEUDO   2
 

A pseudo-dynamic light.

Unless you are using shaders/renderloop that treat all lights as dynamic this light cannot move but it can change color. Shadows are accurate and precalculated (if you use lightmaps).

Definition at line 74 of file light.h.

#define CS_LIGHT_DYNAMICTYPE_STATIC   1
 

A fully static light.

Unless you are using shaders/renderloop that treat all lights as dynamic this light cannot move and cannot change color. Shadows are accurate and precalculated (if you use lightmaps).

Definition at line 67 of file light.h.

#define CS_LIGHT_THINGSHADOWS   0x00000001
 

If CS_LIGHT_THINGSHADOWS is set for a light then things will also cast shadows.

This flag is set by default for static lights and unset for dynamic lights.

Definition at line 50 of file light.h.

#define CS_NORMAL_LIGHT_LEVEL   128
 

Light level that corresponds to a normally lit texture.

Definition at line 87 of file light.h.


Enumeration Type Documentation

enum csHaloType
 

The possible halo-types.

Enumeration values:
cshtCross  Cross halo.
cshtNova  Nova halo.
cshtFlare  Flare halo.

Definition at line 36 of file halo.h.


Generated for Crystal Space by doxygen 1.2.18