CrystalSpace

Public API Reference

iengine/light.h File Reference

Light interfaces. More...

#include "csutil/scf.h"

Go to the source code of this file.

Classes

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  iLightFactory
 A light factory. More...
struct  iLightFactoryList
 A list of light factories. More...
struct  iLightIterator
 Iterator to iterate over all static lights in the engine. More...
struct  iLightList
 This structure represents a list of lights. More...

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.
Light flags



#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.
#define CS_LIGHT_NOSHADOWS   0x00000001
 Indicates that a light should not cast shadows.

Enumerations

enum  csLightType { CS_LIGHT_POINTLIGHT, CS_LIGHT_DIRECTIONAL, CS_LIGHT_SPOTLIGHT }
 

Type of lightsource.

More...
Attenuation modes

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

Apart from the attenuation mode there are one to tree constants, which change meaning depending on attenuation mode. There are five attenuation formulas: (distance is distance between point for which lighting is computed and the light)

  • no attenuation = light * 1
  • linear attenuation = light * (1 - distance / constant1)
  • inverse attenuation = light / distance
  • realistic attenuation = light / distance^2
  • CLQ, Constant Linear Quadratic = light / (constant1 + constant2*distance + constant3*distance^2)


enum  csLightAttenuationMode {
  CS_ATTN_NONE = 0, CS_ATTN_LINEAR = 1, CS_ATTN_INVERSE = 2, CS_ATTN_REALISTIC = 3,
  CS_ATTN_CLQ = 4
}
Light Dynamic Types



enum  csLightDynamicType { CS_LIGHT_DYNAMICTYPE_STATIC = 1, CS_LIGHT_DYNAMICTYPE_PSEUDO = 2, CS_LIGHT_DYNAMICTYPE_DYNAMIC = 3 }

Detailed Description

Light interfaces.

Definition in file light.h.


Generated for Crystal Space 2.1 by doxygen 1.6.1