21 #ifndef CAELUM__SKYLIGHT_H 22 #define CAELUM__SKYLIGHT_H 24 #include "CameraBoundElement.h" 78 Ogre::SceneManager *sceneMgr,
79 Ogre::SceneNode *caelumRootNode);
90 const Ogre::Vector3& direction,
91 const Ogre::ColourValue &lightColour,
92 const Ogre::ColourValue &bodyColour);
95 const Ogre::Vector3 getLightDirection ()
const;
98 virtual void setLightDirection (
const Ogre::Vector3 &dir);
101 const Ogre::ColourValue getBodyColour ()
const;
104 virtual void setBodyColour (
const Ogre::ColourValue &colour);
107 const Ogre::ColourValue getLightColour ()
const;
110 virtual void setLightColour (
const Ogre::ColourValue &colour);
113 void setDiffuseMultiplier (
const Ogre::ColourValue &diffuse);
116 const Ogre::ColourValue getDiffuseMultiplier ()
const;
119 void setSpecularMultiplier (
const Ogre::ColourValue &specular);
122 const Ogre::ColourValue getSpecularMultiplier ()
const;
127 void setAmbientMultiplier (
const Ogre::ColourValue &ambient);
130 const Ogre::ColourValue getAmbientMultiplier ()
const;
133 Ogre::Light* getMainLight()
const;
151 static const Ogre::Real DEFAULT_AUTO_DISABLE_THRESHOLD;
155 inline bool getForceDisable()
const {
return mForceDisableLight; }
157 virtual void setQueryFlags (uint flags) = 0;
158 virtual uint getQueryFlags ()
const = 0;
159 virtual void setVisibilityFlags (uint flags) = 0;
160 virtual uint getVisibilityFlags ()
const = 0;
164 virtual void setFarRadius (Ogre::Real radius);
167 void setMainLightColour(
const Ogre::ColourValue &colour);
171 bool shouldEnableLight(
const Ogre::ColourValue &colour);
175 #endif // CAELUM__SKYLIGHT_H Ogre::Real mAutoDisableThreshold
Threshold beneath which the light is automatically disabled.
Ogre::Real getAutoDisableThreshold() const
Get the auto-disable threshold.
void setAutoDisableThreshold(Ogre::Real value)
Set the auto-disable threshold.
float mRadius
Base distance of the light.
Base class for sky lights (sun and moon).
Ogre::SceneNode * mNode
The sun scene node.
bool mForceDisableLight
If the light is always disabled. Separate from the mAutoDisable mechanism.
bool mAutoDisableLight
If the light is automatically disabled beneath mAutoDisableThreshold.
Ogre::ColourValue mLightColour
Sun light colour, as set by setLightColour.
Ogre::ColourValue mDiffuseMultiplier
Colour multiplier for light diffuse colour.
Ogre::ColourValue mBodyColour
Body sphere colour, as set by setBodyColour.
Ogre::Light * mMainLight
The main directional light.
void setAutoDisable(bool value)
Turn on and off auto-disabling of the light when too dim.
Ogre::ColourValue mSpecularMultiplier
Colour multiplier for light specular colour.
Ogre::Vector3 mDirection
The latest normalised sun direction.
bool getAutoDisable() const
Check if the light is automatically disabled.
Ogre::ColourValue mAmbientMultiplier
Colour multiplier for ambient light colour.
void setForceDisable(bool value)
Disable the light by force; without taking intensity into account.