Caelum::ImageStarfield Class Reference

Image-based starfield class. More...

#include <ImageStarfield.h>

Inheritance diagram for Caelum::ImageStarfield:

Caelum::CameraBoundElement

List of all members.

Public Member Functions

 ImageStarfield (Ogre::SceneManager *sceneMgr, Ogre::SceneNode *caelumRootNode, const Ogre::String &textureName=DEFAULT_TEXTURE_NAME)
 Constructor.
virtual ~ImageStarfield ()
 Destructor.
void setInclination (Ogre::Degree inc)
 Sets the starfield inclination.
void update (const float time)
 Updates the starfield position/orientation.
void setTexture (const Ogre::String &mapName)
 Updates the starfield material.
virtual void notifyCameraChanged (Ogre::Camera *cam)
 Handle camera change.
void setQueryFlags (uint flags)
uint getQueryFlags () const
void setVisibilityFlags (uint flags)
uint getVisibilityFlags () const

Static Public Attributes

static const String DEFAULT_TEXTURE_NAME = "Starfield.jpg"

Protected Member Functions

virtual void setFarRadius (Ogre::Real radius)
 Handle far radius.

Protected Attributes

PrivateSceneNodePtr mNode
 Reference to the dome node.
PrivateMaterialPtr mStarfieldMaterial
 Reference to the (cloned) starfield material.
PrivateEntityPtr mEntity
 Reference to the dome entity.
Ogre::Degree mInclination
 Inclination of the starfield.

Static Protected Attributes

static const Ogre::String STARFIELD_DOME_NAME = "CaelumStarfieldDome"
 Name of the spheric dome resource.
static const Ogre::String STARFIELD_MATERIAL_NAME = "CaelumStarfieldMaterial"
 Name of the starfield material.


Detailed Description

Image-based starfield class.

This class implements a starfield based on mapping a single large texture on a sphere.

See also:
PointStarfield for a better solution.

Definition at line 34 of file ImageStarfield.h.


Constructor & Destructor Documentation

Caelum::ImageStarfield::ImageStarfield ( Ogre::SceneManager *  sceneMgr,
Ogre::SceneNode *  caelumRootNode,
const Ogre::String &  textureName = DEFAULT_TEXTURE_NAME 
)

Constructor.

Parameters:
sceneMgr The scene manager this dome will belong to.

Definition at line 32 of file ImageStarfield.cpp.

References Caelum::InternalUtilities::checkLoadMaterialClone(), Caelum::InternalUtilities::generateSphericDome(), and Caelum::InternalUtilities::pointerToString().


Member Function Documentation

void Caelum::ImageStarfield::setInclination ( Ogre::Degree  inc  ) 

Sets the starfield inclination.

This inclination is the angle between the starfield rotation axis and the horizon plane.

Parameters:
inc The starfield inclination in degrees. It`s equal to observer latitude taken with opposite sign.

Definition at line 71 of file ImageStarfield.cpp.

References mInclination.

Referenced by Caelum::CaelumSystem::updateSubcomponents().

void Caelum::ImageStarfield::update ( const float  time  ) 

Updates the starfield position/orientation.

Parameters:
time Local time in [0, 1] range.

Definition at line 75 of file ImageStarfield.cpp.

References mInclination, and mNode.

Referenced by Caelum::CaelumSystem::updateSubcomponents().

void Caelum::ImageStarfield::setTexture ( const Ogre::String &  mapName  ) 

Updates the starfield material.

Parameters:
mapName The new starfield texture map name.

Definition at line 83 of file ImageStarfield.cpp.

References mStarfieldMaterial.


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