Loading...
Searching...
No Matches
SLight.h
Go to the documentation of this file.
// Copyright (C) 2002-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __S_LIGHT_H_INCLUDED__
#define __S_LIGHT_H_INCLUDED__
#include "SColor.h"
namespace irr
{
namespace video
{
enum E_LIGHT_TYPE
{
ELT_POINT,
ELT_SPOT,
ELT_DIRECTIONAL,
ELT_COUNT
};
const c8* const LightTypeNames[] =
{
"Point",
"Spot",
"Directional",
0
};
struct SLight
{
SLight() : AmbientColor(0.f,0.f,0.f), DiffuseColor(1.f,1.f,1.f),
SpecularColor(1.f,1.f,1.f), Attenuation(1.f,0.f,0.f),
OuterCone(45.f), InnerCone(0.f), Falloff(2.f),
Position(0.f,0.f,0.f), Direction(0.f,0.f,1.f),
Radius(100.f), Type(ELT_POINT), CastShadows(true)
{}
SColorf AmbientColor;
SColorf DiffuseColor;
SColorf SpecularColor;
core::vector3df Attenuation;
f32 OuterCone;
f32 InnerCone;
f32 Falloff;
core::vector3df Position;
core::vector3df Direction;
f32 Radius;
E_LIGHT_TYPE Type;
bool CastShadows:1;
};
} // end namespace video
} // end namespace irr
#endif
SColor.h
irr::video::SColorf
Class representing a color with four floats.
Definition SColor.h:459
irr::core::vector3df
vector3d< f32 > vector3df
Typedef for a f32 3d vector.
Definition vector3d.h:445
irr::video
The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done ...
Definition EDriverFeatures.h:11
irr::video::LightTypeNames
const c8 *const LightTypeNames[]
Names for light types.
Definition SLight.h:30
irr::video::E_LIGHT_TYPE
E_LIGHT_TYPE
Enumeration for different types of lights.
Definition SLight.h:17
irr::video::ELT_POINT
@ ELT_POINT
point light, it has a position in space and radiates light in all directions
Definition SLight.h:19
irr::video::ELT_DIRECTIONAL
@ ELT_DIRECTIONAL
directional light, coming from a direction from an infinite distance
Definition SLight.h:23
irr::video::ELT_SPOT
@ ELT_SPOT
spot light, it has a position in space, a direction, and a limited cone of influence
Definition SLight.h:21
irr::video::ELT_COUNT
@ ELT_COUNT
Only used for counting the elements of this enum.
Definition SLight.h:26
irr
Everything in the Irrlicht Engine can be found in this namespace.
Definition aabbox3d.h:13
irr::f32
float f32
32 bit floating point variable.
Definition irrTypes.h:104
irr::c8
char c8
8 bit character variable.
Definition irrTypes.h:31
irr::video::SLight::Attenuation
core::vector3df Attenuation
Attenuation factors (constant, linear, quadratic).
Definition SLight.h:65
irr::video::SLight::AmbientColor
SColorf AmbientColor
Ambient color emitted by the light.
Definition SLight.h:51
irr::video::SLight::DiffuseColor
SColorf DiffuseColor
Diffuse color emitted by the light.
Definition SLight.h:55
irr::video::SLight::Direction
core::vector3df Direction
Read-ONLY! Direction of the light.
Definition SLight.h:82
irr::video::SLight::SpecularColor
SColorf SpecularColor
Specular color emitted by the light.
Definition SLight.h:59
irr::video::SLight::Falloff
f32 Falloff
The light strength's decrease between Outer and Inner cone.
Definition SLight.h:74
irr::video::SLight::OuterCone
f32 OuterCone
The angle of the spot's outer cone. Ignored for other lights.
Definition SLight.h:68
irr::video::SLight::SLight
SLight()
Definition SLight.h:43
irr::video::SLight::Radius
f32 Radius
Read-ONLY! Radius of light. Everything within this radius will be lighted.
Definition SLight.h:85
irr::video::SLight::InnerCone
f32 InnerCone
The angle of the spot's inner cone. Ignored for other lights.
Definition SLight.h:71
irr::video::SLight::Type
E_LIGHT_TYPE Type
Read-ONLY! Type of the light. Default: ELT_POINT.
Definition SLight.h:88
irr::video::SLight::Position
core::vector3df Position
Read-ONLY! Position of the light.
Definition SLight.h:78
irr::video::SLight::CastShadows
bool CastShadows
Read-ONLY! Does the light cast shadows?
Definition SLight.h:91
- Irrlicht Engine Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on for Irrlicht 3D Engine by Doxygen 1.15.0