arsa  2.7
Public Member Functions | Public Attributes | List of all members
irr::video::SLight Struct Reference

structure for holding data describing a dynamic point light. More...

#include <SLight.h>

Public Member Functions

 SLight ()
 

Public Attributes

SColorf AmbientColor
 Ambient color emitted by the light. More...
 
SColorf DiffuseColor
 Diffuse color emitted by the light. More...
 
SColorf SpecularColor
 Specular color emitted by the light. More...
 
core::vector3df Attenuation
 Attenuation factors (constant, linear, quadratic) More...
 
f32 OuterCone
 The angle of the spot's outer cone. Ignored for other lights. More...
 
f32 InnerCone
 The angle of the spot's inner cone. Ignored for other lights. More...
 
f32 Falloff
 The light strength's decrease between Outer and Inner cone. Only for spot lights. More...
 
core::vector3df Position
 Read-ONLY! Position of the light. More...
 
core::vector3df Direction
 Read-ONLY! Direction of the light. More...
 
f32 Radius
 Read-ONLY! Radius of light. Everything within this radius will be lighted. More...
 
E_LIGHT_TYPE Type
 Read-ONLY! Type of the light. Default: ELT_POINT. More...
 
bool CastShadows:1
 Read-ONLY! Does the light cast shadows? More...
 

Detailed Description

structure for holding data describing a dynamic point light.

Irrlicht supports point lights, spot lights, and directional lights.

Definition at line 41 of file SLight.h.

Constructor & Destructor Documentation

◆ SLight()

irr::video::SLight::SLight ( )
inline

Definition at line 43 of file SLight.h.

43  : AmbientColor(0.f,0.f,0.f), DiffuseColor(1.f,1.f,1.f),
44  SpecularColor(1.f,1.f,1.f), Attenuation(1.f,0.f,0.f),
45  OuterCone(45.f), InnerCone(0.f), Falloff(2.f),
46  Position(0.f,0.f,0.f), Direction(0.f,0.f,1.f),
47  Radius(100.f), Type(ELT_POINT), CastShadows(true)
48  {}
f32 Falloff
The light strength's decrease between Outer and Inner cone. Only for spot lights.
Definition: SLight.h:74
SColorf AmbientColor
Ambient color emitted by the light.
Definition: SLight.h:51
core::vector3df Direction
Read-ONLY! Direction of the light.
Definition: SLight.h:82
f32 OuterCone
The angle of the spot's outer cone. Ignored for other lights.
Definition: SLight.h:68
point light, it has a position in space and radiates light in all directions
Definition: SLight.h:19
GLfloat f
E_LIGHT_TYPE Type
Read-ONLY! Type of the light. Default: ELT_POINT.
Definition: SLight.h:91
f32 Radius
Read-ONLY! Radius of light. Everything within this radius will be lighted.
Definition: SLight.h:88
SColorf DiffuseColor
Diffuse color emitted by the light.
Definition: SLight.h:55
SColorf SpecularColor
Specular color emitted by the light.
Definition: SLight.h:59
f32 InnerCone
The angle of the spot's inner cone. Ignored for other lights.
Definition: SLight.h:71
core::vector3df Position
Read-ONLY! Position of the light.
Definition: SLight.h:78
core::vector3df Attenuation
Attenuation factors (constant, linear, quadratic)
Definition: SLight.h:65
bool CastShadows
Read-ONLY! Does the light cast shadows?
Definition: SLight.h:94

Member Data Documentation

◆ AmbientColor

SColorf irr::video::SLight::AmbientColor

Ambient color emitted by the light.

Definition at line 51 of file SLight.h.

◆ Attenuation

core::vector3df irr::video::SLight::Attenuation

Attenuation factors (constant, linear, quadratic)

Changes the light strength fading over distance. Can also be altered by setting the radius, Attenuation will change to (0,1.f/radius,0). Can be overridden after radius was set.

Definition at line 65 of file SLight.h.

◆ CastShadows

bool irr::video::SLight::CastShadows

Read-ONLY! Does the light cast shadows?

Definition at line 94 of file SLight.h.

◆ DiffuseColor

SColorf irr::video::SLight::DiffuseColor

Diffuse color emitted by the light.

This is the primary color you want to set.

Definition at line 55 of file SLight.h.

◆ Direction

core::vector3df irr::video::SLight::Direction

Read-ONLY! Direction of the light.

If Type is ELT_POINT, it is ignored. Changed via light scene node's rotation.

Definition at line 82 of file SLight.h.

◆ Falloff

f32 irr::video::SLight::Falloff

The light strength's decrease between Outer and Inner cone. Only for spot lights.

Definition at line 74 of file SLight.h.

◆ InnerCone

f32 irr::video::SLight::InnerCone

The angle of the spot's inner cone. Ignored for other lights.

Definition at line 71 of file SLight.h.

◆ OuterCone

f32 irr::video::SLight::OuterCone

The angle of the spot's outer cone. Ignored for other lights.

Definition at line 68 of file SLight.h.

◆ Position

core::vector3df irr::video::SLight::Position

Read-ONLY! Position of the light.

If Type is ELT_DIRECTIONAL, it is ignored. Changed via light scene node's position.

Definition at line 78 of file SLight.h.

◆ Radius

f32 irr::video::SLight::Radius

Read-ONLY! Radius of light. Everything within this radius will be lighted.

On OpenGL light doesn't stop at radius. To get same light as in OpenGL in other drivers do set the radius to a large value like sqrt(FLT_MAX) and then set the Attenuation afterwards.

Definition at line 88 of file SLight.h.

◆ SpecularColor

SColorf irr::video::SLight::SpecularColor

Specular color emitted by the light.

For details how to use specular highlights, see SMaterial::Shininess

Definition at line 59 of file SLight.h.

◆ Type

E_LIGHT_TYPE irr::video::SLight::Type

Read-ONLY! Type of the light. Default: ELT_POINT.

Definition at line 91 of file SLight.h.


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