31 #include "hpl1/engine/graphics/GraphicsTypes.h" 35 class iLowLevelGraphics;
41 virtual ~
iLight() =
default;
45 void FadeTo(
const cColor &aCol,
float afRadius,
float afTime);
47 cColor GetDestColor() {
return mDestCol; }
48 float GetDestRadius() {
return mfDestRadius; }
52 void SetFlickerActive(
bool abX);
53 bool GetFlickerActive() {
return mbFlickering; }
55 void SetFlicker(
const cColor &aOffCol,
float afOffRadius,
56 float afOnMinLength,
float afOnMaxLength,
const tString &asOnSound,
const tString &asOnPS,
57 float afOffMinLength,
float afOffMaxLength,
const tString &asOffSound,
const tString &asOffPS,
58 bool abFade,
float afOnFadeLength,
float afOffFadeLength);
60 tString GetFlickerOffSound() {
return msFlickerOffSound; }
61 tString GetFlickerOnSound() {
return msFlickerOnSound; }
62 tString GetFlickerOffPS() {
return msFlickerOffPS; }
63 tString GetFlickerOnPS() {
return msFlickerOnPS; }
64 float GetFlickerOnMinLength() {
return mfFlickerOnMinLength; }
65 float GetFlickerOffMinLength() {
return mfFlickerOffMinLength; }
66 float GetFlickerOnMaxLength() {
return mfFlickerOnMaxLength; }
67 float GetFlickerOffMaxLength() {
return mfFlickerOffMaxLength; }
68 cColor GetFlickerOffColor() {
return mFlickerOffColor; }
69 float GetFlickerOffRadius() {
return mfFlickerOffRadius; }
70 bool GetFlickerFade() {
return mbFlickerFade; }
71 float GetFlickerOnFadeLength() {
return mfFlickerOnFadeLength; }
72 float GetFlickerOffFadeLength() {
return mfFlickerOffFadeLength; }
74 cColor GetFlickerOnColor() {
return mFlickerOnColor; }
75 float GetFlickerOnRadius() {
return mfFlickerOnRadius; }
79 const cColor &GetDiffuseColor() {
return mDiffuseColor; }
80 void SetDiffuseColor(
cColor aColor);
81 const cColor &GetSpecularColor() {
return mSpecularColor; }
82 void SetSpecularColor(
cColor aColor) { mSpecularColor = aColor; }
84 float GetIntensity() {
return mfIntensity; }
85 void SetIntensity(
float afX) { mfIntensity = afX; }
86 bool GetCastShadows() {
return mbCastShadows; }
87 void SetCastShadows(
bool afX) { mbCastShadows = afX; }
89 bool GetAffectMaterial() {
return mbAffectMaterial; }
90 void SetAffectMaterial(
bool afX) { mbAffectMaterial = afX; }
92 float GetFarAttenuation() {
return mfFarAttenuation; }
93 float GetNearAttenuation() {
return mfNearAttenuation; }
95 virtual void SetFarAttenuation(
float afX) = 0;
96 virtual void SetNearAttenuation(
float afX) = 0;
98 float GetSourceRadius() {
return mfSourceRadius; }
99 void SetSourceRadius(
float afX) { mfSourceRadius = afX; }
101 virtual cVector3f GetLightPosition() = 0;
103 void UpdateLight(
float afTimeStep);
105 void SetWorld3D(
cWorld3D *apWorld) { mpWorld3D = apWorld; }
108 virtual void OnFlickerOff() {}
109 virtual void OnFlickerOn() {}
110 virtual void OnSetDiffuse() {}
115 float mfFarAttenuation;
116 float mfNearAttenuation;
117 float mfSourceRadius;
120 bool mbAffectMaterial;
139 float mfFlickerOnMinLength;
140 float mfFlickerOffMinLength;
141 float mfFlickerOnMaxLength;
142 float mfFlickerOffMaxLength;
144 float mfFlickerOffRadius;
146 float mfFlickerOnFadeLength;
147 float mfFlickerOffFadeLength;
150 float mfFlickerOnRadius;
154 float mfFlickerStateLength;
159 #endif // HPL_LIGHT_H
Definition: World3D.h:179