| Irrlicht 3D Engine |

SLight.h
Go to the documentation of this file.

    00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
    00002 // This file is part of the "Irrlicht Engine".
    00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
    00004
    00005 #ifndef __S_LIGHT_H_INCLUDED__
    00006 #define __S_LIGHT_H_INCLUDED__
    00007
    00008 #include "SColor.h"
    00009
    00010 namespace irr
    00011 {
    00012 namespace video
    00013 {
    00014
    00016 enum E_LIGHT_TYPE
    00017 {
    00019     ELT_POINT,
    00021     ELT_SPOT,
    00023     ELT_DIRECTIONAL,
    00024
    00026     ELT_COUNT
    00027 };
    00028
    00030 const c8* const LightTypeNames[] =
    00031 {
    00032     "Point",
    00033     "Spot",
    00034     "Directional",
    00035     0
    00036 };
    00037
    00039
    00041 struct SLight
    00042 {
    00043     SLight() : AmbientColor(0.f,0.f,0.f), DiffuseColor(1.f,1.f,1.f),
    00044         SpecularColor(1.f,1.f,1.f), Attenuation(1.f,0.f,0.f),
    00045         OuterCone(45.f), InnerCone(0.f), Falloff(2.f),
    00046         Position(0.f,0.f,0.f), Direction(0.f,0.f,1.f),
    00047         Radius(100.f), Type(ELT_POINT), CastShadows(true)
    00048         {}
    00049
    00051     SColorf AmbientColor;
    00052
    00054
    00055     SColorf DiffuseColor;
    00056
    00058
    00059     SColorf SpecularColor;
    00060
    00062
    00065     core::vector3df Attenuation;
    00066
    00068     f32 OuterCone;
    00069
    00071     f32 InnerCone;
    00072
    00074     f32 Falloff;
    00075
    00077
    00078     core::vector3df Position;
    00079
    00081
    00082     core::vector3df Direction;
    00083
    00085     f32 Radius;
    00086
    00088     E_LIGHT_TYPE Type;
    00089
    00091     bool CastShadows:1;
    00092 };
    00093
    00094 } // end namespace video
    00095 } // end namespace irr
    00096
    00097 #endif
    00098