SLVec4< SLfloat > SLCol4f
SLint _id
OpenGL light number (0-7)
SLCol4f _ambientColor
Ambient light color (RGB 0-1)
SLuint _softShadowLevel
Radius to smoothing (1 = 3 * 3; 2 = 5 * 5; ...)
SLfloat _kc
Constant light attenuation.
SLfloat _shadowMaxBias
Max. bias at 90 deg. to use to prevent shadow acne.
SLbool createsShadows() const
SLShadowMap * _shadowMap
Used for shadow mapping.
static SLfloat gamma
final output gamma value
SLfloat _diffusePower
Diffuse light power (0-N)
SLbool _isAttenuated
fast attenuation flag for ray tracing
SLfloat spotCutOffDEG() const
SLbool _isOn
Flag if light is on or off.
static SLbool doColoredShadows
flag if shadows should be displayed with colors for debugging
static SLCol4f globalAmbient
static global ambient light intensity
SLfloat _kq
Quadratic light attenuation.
SLfloat _specularPower
Specular light power (0-N)
virtual void renderShadowMap(SLSceneView *sv, SLNode *root)
SLLight::renderShadowMap renders the shadow map of the light.
virtual void createShadowMap(float lightClipNear=0.1f, float lightClipFar=20.0f, SLVec2f size=SLVec2f(8, 8), SLVec2i texSize=SLVec2i(1024, 1024))=0
SLLight(SLfloat ambiPower=0.1f, SLfloat diffPower=1.0f, SLfloat specPower=1.0f, SLint id=-1)
Construct a new SLLight::SLLight object.
SLfloat _spotExponent
Spot attenuation from center to edge of cone.
SLCol4f _diffuseColor
Diffuse light color (RGB 0-1)
SLfloat _spotCutOffDEG
Half the spot cone angle.
SLfloat _ambientPower
Ambient light power (0-N)
SLbool _createsShadows
flag if light creates shadows or not
SLfloat _shadowMinBias
Min. bias at 0 deg. to use to prevent shadow acne.
SLfloat _spotCosCutOffRAD
cosine of spotCutoff angle
SLfloat _kl
Linear light attenuation.
SLbool _doSoftShadows
flag if percentage-closer filtering for smooth shadows is enabled
SLCol4f _specularColor
Specular light color (RGB 0-1)
SLNode represents a node in a hierarchical scene graph.
SceneView class represents a dynamic real time 3D view onto the scene.
void renderShadows(SLSceneView *sv, SLNode *root)
void set(const T X, const T Y, const T Z, const T W=1)
static const float DEG2RAD