Caelum
0.6.4
|
Image-based starfield class. More...
#include <ImageStarfield.h>
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. | |
Image-based starfield class.
This class implements a starfield based on mapping a single large texture on a sphere.
Caelum::ImageStarfield::ImageStarfield | ( | Ogre::SceneManager * | sceneMgr, |
Ogre::SceneNode * | caelumRootNode, | ||
const Ogre::String & | textureName = DEFAULT_TEXTURE_NAME |
||
) |
Constructor.
sceneMgr | The scene manager this dome will belong to. |
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. |
void Caelum::ImageStarfield::update | ( | const float | time | ) |
Updates the starfield position/orientation.
time | Local time in [0, 1] range. |
void Caelum::ImageStarfield::setTexture | ( | const Ogre::String & | mapName | ) |
Updates the starfield material.
mapName | The new starfield texture map name. |