Caelum::SpriteSun Class Reference

Class representing the sun as billboard with texture on it. More...

#include <Sun.h>

Inheritance diagram for Caelum::SpriteSun:

Caelum::BaseSkyLight Caelum::CameraBoundElement

List of all members.

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))
 Constructor.
virtual ~SpriteSun ()
 Destructor.
void setSunTexture (const Ogre::String &textureName)
 Updates the sun material.
void setSunTextureAngularSize (const Ogre::Degree &sunTextureAngularSize)
 Updates the sun size.
void setBodyColour (const Ogre::ColourValue &colour)
 Sets the sun sphere colour.
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

Static Public Attributes

static const Ogre::String SUN_MATERIAL_NAME = "CaelumSpriteSun"
 Name of the sun material.

Protected Attributes

PrivateMaterialPtr mSunMaterial
 The sun material.
PrivateBillboardSetPtr mSunBillboardSet
 The sun sprite / billboard.
Ogre::Degree mSunTextureAngularSize
 The sun sprite visible angle.


Detailed Description

Class representing the sun as billboard with texture on it.

Definition at line 84 of file Sun.h.


Constructor & Destructor Documentation

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.

Parameters:
sceneMgr The scene manager where the lights will be created.
sunTextureAngularSize 0.53f is real angular size of Sun and Moon, 3.77f is compatible with SphereSun

Definition at line 73 of file Sun.cpp.

References Caelum::InternalUtilities::checkLoadMaterialClone(), Caelum::BaseSkyLight::mNode, mSunBillboardSet, mSunMaterial, Caelum::InternalUtilities::pointerToString(), Caelum::PrivatePtr< PointedT, TraitsT >::reset(), setSunTexture(), and SUN_MATERIAL_NAME.

Caelum::SpriteSun::~SpriteSun (  )  [virtual]

Destructor.

Note:
If a sun position model is in use, it will be deleted.

Definition at line 97 of file Sun.cpp.


Member Function Documentation

void Caelum::SpriteSun::setSunTexture ( const Ogre::String &  textureName  ) 

Updates the sun material.

Parameters:
textureName The new sun texture name.

Definition at line 106 of file Sun.cpp.

References mSunMaterial.

Referenced by SpriteSun().

void Caelum::SpriteSun::setSunTextureAngularSize ( const Ogre::Degree &  sunTextureAngularSize  ) 

Updates the sun size.

Parameters:
sunTextureAngularSize The new sun texture angular size.

Definition at line 114 of file Sun.cpp.

References mSunTextureAngularSize.

void Caelum::SpriteSun::setBodyColour ( const Ogre::ColourValue &  colour  )  [virtual]

Sets the sun sphere colour.

Parameters:
colour The colour used to draw the sun

Reimplemented from Caelum::BaseSkyLight.

Definition at line 99 of file Sun.cpp.

References mSunBillboardSet.


The documentation for this class was generated from the following files:

Generated on Sun Aug 9 10:24:22 2009 for Caelum by  doxygen 1.5.9