22 #ifndef TETRAEDGE_TE_TE_LIGHT_H 23 #define TETRAEDGE_TE_TE_LIGHT_H 25 #include "tetraedge/te/te_vector3f32.h" 26 #include "tetraedge/te/te_vector2f32.h" 27 #include "tetraedge/te/te_color.h" 33 LightTypeDirectional = 1,
45 virtual void disable(uint lightno) = 0;
46 virtual void enable(uint lightno) = 0;
48 virtual void draw(
TeCamera &camera) = 0;
53 virtual void update(uint lightno) = 0;
54 static void setGlobalAmbient(
const TeColor &col) { _globalAmbientColor = col.getPacked32(); }
55 static TeColor globalAmbient() {
return TeColor(_globalAmbientColor); }
57 void setSpecular(
const TeColor &col) { _colSpecular = col; }
58 void setDiffuse(
const TeColor &col) { _colDiffuse = col; }
59 void setAmbient(
const TeColor &col) { _colAmbient = col; }
61 void setConstAtten(
float val) { _constAtten = val; }
62 void setLinearAtten(
float val) { _linearAtten = val; }
63 void setQuadraticAtten(
float val) { _quadraticAtten = val; }
64 void setCutoff(
float val) { _cutoff = val; }
65 void setExponent(
float val) { _exponent = val; }
66 void setDisplaySize(
float val) { _displaySize = val; }
67 void setPosition3d(
const TeVector3f32 &pos) { _position3d = pos; }
68 void setPositionRadial(
const TeVector2f32 &pos) { _positionRadial = pos; }
69 void setType(TeLightType ltype) { _type = ltype; }
71 const TeVector2f32 &positionRadial()
const {
return _positionRadial; }
72 const TeVector3f32 &position3d()
const {
return _position3d; }
75 void correctAttenuation();
87 enum TeLightType _type;
89 static uint32 _globalAmbientColor;
93 float _quadraticAtten;
101 #endif // TETRAEDGE_TE_TE_LIGHT_H Definition: te_camera.h:38
Definition: detection.h:27
Definition: te_color.h:30
Definition: te_vector3f32.h:33
Definition: te_vector2f32.h:32
Definition: te_light.h:39