Caelum  0.6.3
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Caelum::ImageStarfield Class Reference

Image-based starfield class. More...

#include <ImageStarfield.h>

Inheritance diagram for Caelum::ImageStarfield:
Inheritance graph
[legend]

Public Member Functions

 ImageStarfield (Ogre::SceneManager *sceneMgr, Ogre::SceneNode *caelumRootNode, const Ogre::String &textureName=DEFAULT_TEXTURE_NAME)
 Constructor. More...
 
virtual ~ImageStarfield ()
 Destructor.
 
void setInclination (Ogre::Degree inc)
 Sets the starfield inclination. More...
 
void update (const float time)
 Updates the starfield position/orientation. More...
 
void setTexture (const Ogre::String &mapName)
 Updates the starfield material. More...
 
virtual void notifyCameraChanged (Ogre::Camera *cam)
 Handle camera change.
 
void setQueryFlags (uint flags)
 
uint getQueryFlags () const
 
void setVisibilityFlags (uint flags)
 
uint getVisibilityFlags () const
 
- Public Member Functions inherited from Caelum::CameraBoundElement
 CameraBoundElement ()
 Constructor. More...
 
virtual ~CameraBoundElement ()
 Virtual Destructor.
 
void forceFarRadius (Ogre::Real radius)
 Forces the "far" size of the element to a specific radius. More...
 
bool getAutoRadius () const
 Checks if this element is in auto-radius mode. More...
 
void setAutoRadius ()
 Re-enable auto-radius; if disabled. More...
 

Static Public Attributes

static const String DEFAULT_TEXTURE_NAME
 
- Static Public Attributes inherited from Caelum::CameraBoundElement
static const Ogre::Real CAMERA_FAR_DISTANCE_MULTIPLIER
 Camera distances multiplier for the far clipping distance. More...
 
static const Ogre::Real CAMERA_NEAR_DISTANCE_MULTIPLIER
 Camera distances multiplier for the near clipping distance. More...
 

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
 Name of the spheric dome resource.
 
static const Ogre::String STARFIELD_MATERIAL_NAME
 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.

Constructor & Destructor Documentation

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

Constructor.

Parameters
sceneMgrThe scene manager this dome will belong to.

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
incThe starfield inclination in degrees. It`s equal to observer latitude taken with opposite sign.
void Caelum::ImageStarfield::update ( const float  time)

Updates the starfield position/orientation.

Parameters
timeLocal time in [0, 1] range.
void Caelum::ImageStarfield::setTexture ( const Ogre::String mapName)

Updates the starfield material.

Parameters
mapNameThe new starfield texture map name.

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