caelum::SpriteSun Class Reference

#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))
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.


Detailed Description

Class representing the sun as billboard with texture on it.
Author:
Eugene Golushkov

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) 
)

Constructor.

Parameters:
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.

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

Definition at line 105 of file Sun.cpp.

References 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 123 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 131 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 116 of file Sun.cpp.

References mSunBillboardSet, and caelum::BaseSkyLight::setBodyColour().


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

Generated on Fri Jul 11 09:24:53 2008 for Caelum by  doxygen 1.5.6