#include <Sun.h>
Public Member Functions | |
SpriteSun (Ogre::SceneManager *sceneMgr, Ogre::SceneNode *caelumRootNode, const Ogre::String &sunTextureName="sun_disc.png", const Ogre::Degree &sunTextureAngularSize=Ogre::Degree(3.77f)) | |
virtual | ~SpriteSun () |
void | setSunTexture (const Ogre::String &textureName) |
void | setSunTextureAngularSize (const Ogre::Degree &sunTextureAngularSize) |
void | setBodyColour (const Ogre::ColourValue &colour) |
virtual void | notifyCameraChanged (Ogre::Camera *cam) |
Handle camera change. | |
Static Public Attributes | |
static const Ogre::String | SUN_MATERIAL_NAME = "CaelumSpriteSun" |
Name of the sun material. | |
Protected Attributes | |
Ogre::BillboardSet * | mSunBillboardSet |
The sun sprite. | |
Ogre::MaterialPtr | mSunMaterial |
Reference to the sun material. | |
Ogre::Degree | mSunTextureAngularSize |
The sun sprite visible angle. |
Definition at line 82 of file Sun.h.
caelum::SpriteSun::SpriteSun | ( | Ogre::SceneManager * | sceneMgr, | |
Ogre::SceneNode * | caelumRootNode, | |||
const Ogre::String & | sunTextureName = "sun_disc.png" , |
|||
const Ogre::Degree & | sunTextureAngularSize = Ogre::Degree(3.77f) | |||
) |
Constructor.
sceneMgr | The scene manager where the lights will be created. |
Definition at line 82 of file Sun.cpp.
References caelum::BaseSkyLight::mNode, mSunBillboardSet, mSunMaterial, setSunTexture(), and SUN_MATERIAL_NAME.
caelum::SpriteSun::~SpriteSun | ( | ) | [virtual] |
Destructor.
Definition at line 105 of file Sun.cpp.
References caelum::BaseSkyLight::mNode, mSunBillboardSet, and mSunMaterial.
void caelum::SpriteSun::setSunTexture | ( | const Ogre::String & | textureName | ) |
Updates the sun material.
textureName | The new sun texture name. |
Definition at line 123 of file Sun.cpp.
References mSunMaterial.
Referenced by SpriteSun().
void caelum::SpriteSun::setSunTextureAngularSize | ( | const Ogre::Degree & | sunTextureAngularSize | ) |
Updates the sun size.
sunTextureAngularSize | The new sun texture angular size. |
Definition at line 131 of file Sun.cpp.
References mSunTextureAngularSize.
void caelum::SpriteSun::setBodyColour | ( | const Ogre::ColourValue & | colour | ) | [virtual] |
Sets the sun sphere colour.
colour | The colour used to draw the sun |
Reimplemented from caelum::BaseSkyLight.
Definition at line 116 of file Sun.cpp.
References mSunBillboardSet, and caelum::BaseSkyLight::setBodyColour().