#include <ImageStarfield.h>
Public Member Functions | |
ImageStarfield (Ogre::SceneManager *sceneMgr, Ogre::SceneNode *caelumRootNode, const Ogre::String &textureName="ImageStarfield.jpg") | |
virtual | ~ImageStarfield () |
void | setInclination (Ogre::Degree inc) |
void | update (const float time) |
void | setTexture (const Ogre::String &mapName) |
virtual void | notifyCameraChanged (Ogre::Camera *cam) |
Handle camera change. | |
Protected Member Functions | |
virtual void | setFarRadius (Ogre::Real radius) |
Handle far radius. | |
Protected Attributes | |
Ogre::SceneNode * | mNode |
Ogre::MaterialPtr | mStarfieldMaterial |
Ogre::Degree | mInclination |
Static Protected Attributes | |
static const Ogre::String | STARFIELD_DOME_NAME = "CaelumStarfieldDome" |
static const Ogre::String | STARFIELD_MATERIAL_NAME = "CaelumStarfieldMaterial" |
Definition at line 32 of file ImageStarfield.h.
caelum::ImageStarfield::ImageStarfield | ( | Ogre::SceneManager * | sceneMgr, | |
Ogre::SceneNode * | caelumRootNode, | |||
const Ogre::String & | textureName = "ImageStarfield.jpg" | |||
) |
Constructor.
sceneMgr | The scene manager this dome will belong to. |
Definition at line 31 of file ImageStarfield.cpp.
References caelum::GeometryFactory::generateSphericDome(), mInclination, mNode, mStarfieldMaterial, setTexture(), STARFIELD_DOME_NAME, and STARFIELD_MATERIAL_NAME.
caelum::ImageStarfield::~ImageStarfield | ( | ) | [virtual] |
Destructor.
Definition at line 51 of file ImageStarfield.cpp.
References mNode, and mStarfieldMaterial.
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.
inc | The starfield inclination in degrees. It`s equal to observer latitude taken with opposite sign. |
Definition at line 74 of file ImageStarfield.cpp.
References mInclination.
void caelum::ImageStarfield::update | ( | const float | time | ) |
Updates the starfield position/orientation.
time | Local time in [0, 1] range. |
Definition at line 78 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.
mapName | The new starfield texture map name. |
Definition at line 86 of file ImageStarfield.cpp.
References mStarfieldMaterial.
Referenced by ImageStarfield().
Ogre::SceneNode* caelum::ImageStarfield::mNode [protected] |
Reference to the dome node.
Definition at line 37 of file ImageStarfield.h.
Referenced by ImageStarfield(), setFarRadius(), update(), and ~ImageStarfield().
const Ogre::String caelum::ImageStarfield::STARFIELD_DOME_NAME = "CaelumStarfieldDome" [static, protected] |
Name of the spheric dome resource.
Definition at line 41 of file ImageStarfield.h.
Referenced by ImageStarfield().
const Ogre::String caelum::ImageStarfield::STARFIELD_MATERIAL_NAME = "CaelumStarfieldMaterial" [static, protected] |
Name of the starfield material.
Definition at line 45 of file ImageStarfield.h.
Referenced by ImageStarfield().
Ogre::MaterialPtr caelum::ImageStarfield::mStarfieldMaterial [protected] |
Reference to the starfield material.
Definition at line 49 of file ImageStarfield.h.
Referenced by ImageStarfield(), setTexture(), and ~ImageStarfield().
Ogre::Degree caelum::ImageStarfield::mInclination [protected] |
Inclination of the starfield.
Definition at line 53 of file ImageStarfield.h.
Referenced by ImageStarfield(), setInclination(), and update().