Caelum
0.6.4
|
Class representing the moon. More...
#include <Moon.h>
Public Member Functions | |
Moon (Ogre::SceneManager *sceneMgr, Ogre::SceneNode *caelumRootNode, const Ogre::String &moonTextureName="moon_disc.dds", Ogre::Degree angularSize=Ogre::Degree(3.77f)) | |
Constructor. | |
void | setMoonTexture (const Ogre::String &textureName) |
Updates the moon material. More... | |
void | setMoonTextureAngularSize (const Ogre::Degree &moonTextureAngularSize) |
Updates the moon size. More... | |
void | setBodyColour (const Ogre::ColourValue &colour) |
Sets the moon sphere colour. More... | |
void | setPhase (Ogre::Real phase) |
Set the moon's phase. | |
void | setMoonNorthPoleDirection (const Ogre::Vector3 &moonNorthPoleDir) |
Set Moon`s north pole direction. | |
virtual void | notifyCameraChanged (Ogre::Camera *cam) |
Handle camera change. | |
virtual void | setQueryFlags (uint flags) |
virtual uint | getQueryFlags () const |
virtual void | setVisibilityFlags (uint flags) |
virtual uint | getVisibilityFlags () const |
Public Member Functions inherited from Caelum::BaseSkyLight | |
BaseSkyLight (Ogre::SceneManager *sceneMgr, Ogre::SceneNode *caelumRootNode) | |
Constructor. More... | |
virtual | ~BaseSkyLight ()=0 |
Destructor. | |
virtual void | update (const Ogre::Vector3 &direction, const Ogre::ColourValue &lightColour, const Ogre::ColourValue &bodyColour) |
Updates skylight parameters. More... | |
const Ogre::Vector3 | getLightDirection () const |
Retrieves the latest light direction. | |
virtual void | setLightDirection (const Ogre::Vector3 &dir) |
Set the sun direction. | |
const Ogre::ColourValue | getBodyColour () const |
Get current body colour, as set in setBodyColour. | |
const Ogre::ColourValue | getLightColour () const |
Get current light colour, as set in setLightColour. | |
virtual void | setLightColour (const Ogre::ColourValue &colour) |
Sets the skylight colour. | |
void | setDiffuseMultiplier (const Ogre::ColourValue &diffuse) |
Set diffuse multiplier for light colour. | |
const Ogre::ColourValue | getDiffuseMultiplier () const |
Set diffuse multiplier for light colour. | |
void | setSpecularMultiplier (const Ogre::ColourValue &specular) |
Set specular multiplier for light colour. | |
const Ogre::ColourValue | getSpecularMultiplier () const |
Set specular multiplier for light colour. | |
void | setAmbientMultiplier (const Ogre::ColourValue &ambient) |
Set ambient multiplier for light colour This value is only stored here; the SceneManager is not touched However, CaelumSystem does use this value. | |
const Ogre::ColourValue | getAmbientMultiplier () const |
Set ambient multiplier for light colour. | |
Ogre::Light * | getMainLight () const |
Direct access to the Ogre::Light. | |
bool | getAutoDisable () const |
Check if the light is automatically disabled. | |
void | setAutoDisable (bool value) |
Turn on and off auto-disabling of the light when too dim. More... | |
Ogre::Real | getAutoDisableThreshold () const |
Get the auto-disable threshold. | |
void | setAutoDisableThreshold (Ogre::Real value) |
Set the auto-disable threshold. | |
void | setForceDisable (bool value) |
Disable the light by force; without taking intensity into account. | |
bool | getForceDisable () const |
Public Member Functions inherited from Caelum::CameraBoundElement | |
CameraBoundElement () | |
Constructor. More... | |
virtual | ~CameraBoundElement () |
Virtual Destructor. | |
void | forceFarRadius (Ogre::Real radius) |
Forces the "far" size of the element to a specific radius. More... | |
bool | getAutoRadius () const |
Checks if this element is in auto-radius mode. More... | |
void | setAutoRadius () |
Re-enable auto-radius; if disabled. More... | |
Static Public Attributes | |
static const Ogre::String | MOON_MATERIAL_NAME |
Name of the moon material. | |
static const Ogre::String | MOON_BACKGROUND_MATERIAL_NAME |
Name of the moon background material. | |
Static Public Attributes inherited from Caelum::BaseSkyLight | |
static const Ogre::Real | DEFAULT_AUTO_DISABLE_THRESHOLD |
Static Public Attributes inherited from Caelum::CameraBoundElement | |
static const Ogre::Real | CAMERA_FAR_DISTANCE_MULTIPLIER |
Camera distances multiplier for the far clipping distance. More... | |
static const Ogre::Real | CAMERA_NEAR_DISTANCE_MULTIPLIER |
Camera distances multiplier for the near clipping distance. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Caelum::BaseSkyLight | |
virtual void | setFarRadius (Ogre::Real radius) |
Handle far radius. | |
void | setMainLightColour (const Ogre::ColourValue &colour) |
Temporary change main light color. | |
bool | shouldEnableLight (const Ogre::ColourValue &colour) |
If the light should be enabled for a certain value. More... | |
Protected Attributes inherited from Caelum::BaseSkyLight | |
Ogre::Light * | mMainLight |
The main directional light. | |
Ogre::SceneNode * | mNode |
The sun scene node. | |
float | mRadius |
Base distance of the light. | |
Ogre::Vector3 | mDirection |
The latest normalised sun direction. | |
Ogre::ColourValue | mBodyColour |
Body sphere colour, as set by setBodyColour. | |
Ogre::ColourValue | mLightColour |
Sun light colour, as set by setLightColour. | |
Ogre::ColourValue | mDiffuseMultiplier |
Colour multiplier for light diffuse colour. | |
Ogre::ColourValue | mSpecularMultiplier |
Colour multiplier for light specular colour. | |
Ogre::ColourValue | mAmbientMultiplier |
Colour multiplier for ambient light colour. More... | |
bool | mAutoDisableLight |
If the light is automatically disabled beneath mAutoDisableThreshold. | |
Ogre::Real | mAutoDisableThreshold |
Threshold beneath which the light is automatically disabled. | |
bool | mForceDisableLight |
If the light is always disabled. Separate from the mAutoDisable mechanism. | |
Class representing the moon.
Drawn as two billboards; one after the stars and one after the skydome. Drawing it before the skydome will make it invisible in daylight; and that's bad.
void Caelum::Moon::setMoonTexture | ( | const Ogre::String & | textureName | ) |
Updates the moon material.
textureName | The new moon texture name. |
void Caelum::Moon::setMoonTextureAngularSize | ( | const Ogre::Degree & | moonTextureAngularSize | ) |
Updates the moon size.
moon | TextureAngularSize The new moon texture angular size. |
|
virtual |
Sets the moon sphere colour.
colour | The colour used to draw the moon |
Reimplemented from Caelum::BaseSkyLight.