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

Ogre::BillboardSetmSunBillboardSet
 The sun sprite.
Ogre::MaterialPtr mSunMaterial
 Reference to the sun material.
Ogre::Degree mSunTextureAngularSize
 The sun sprite visible angle.


Detailed Description

Class representing the sun as billboard with texture on it.

Definition at line 82 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) 
)

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

Destructor.

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

Definition at line 106 of file Sun.cpp.

References Ogre::BillboardSet::_getManager(), Ogre::SceneNode::detachObject(), Ogre::MaterialManager::getSingletonPtr(), Caelum::BaseSkyLight::mNode, mSunBillboardSet, and mSunMaterial.


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 124 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 132 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 117 of file Sun.cpp.

References Ogre::BillboardSet::getBillboard(), mSunBillboardSet, and Caelum::BaseSkyLight::setBodyColour().


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

Generated on Mon Jan 19 09:15:32 2009 for Caelum by  doxygen 1.5.6