|
Caelum
0.6.4
|
Point starfield class. More...
#include <PointStarfield.h>
Classes | |
| struct | Star |
| Struct representing one star inside PointStarfield. More... | |
Public Types | |
| typedef std::vector< Star > | StarVector |
| A vector of Star. | |
Public Member Functions | |
| PointStarfield (Ogre::SceneManager *sceneMgr, Ogre::SceneNode *caelumRootNode, bool initWithCatalogue=true) | |
| Constructor. More... | |
| virtual | ~PointStarfield () |
| Destructor. | |
| StarVector & | getStarVector () |
| Get a reference to the vector of stars. More... | |
| void | notifyStarVectorChanged () |
| You must call this if you change the star vector by hand. | |
| void | clearAllStars () |
| Clear any and all stars. | |
| void | addRandomStars (int count) |
| Add a bunch of random stars. | |
| void | addStar (const BrightStarCatalogueEntry &entry) |
| Add one star from the bright star catalogue. | |
| void | addBrightStarCatalogue (int count=BrightStarCatalogueSize) |
| Add stars from the bright star catalogue. More... | |
| void | update (LongReal julDay) |
| Update function; called from CaelumSystem::updateSubcomponents. More... | |
| void | setMagnitudeScale (Ogre::Real value) |
| Magnitude power scale. More... | |
| Ogre::Real | getMagnitudeScale () const |
| void | setMag0PixelSize (Ogre::Real value) |
| Ogre::Real | getMag0PixelSize () const |
| void | setMinPixelSize (Ogre::Real value) |
| Ogre::Real | getMinPixelSize () const |
| void | setMaxPixelSize (Ogre::Real value) |
| Ogre::Real | getMaxPixelSize () const |
| void | setObserverLatitude (Ogre::Degree value) |
| Ogre::Degree | getObserverLatitude () const |
| void | setObserverLongitude (Ogre::Degree value) |
| Ogre::Degree | getObserverLongitude () const |
| 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 Ogre::String | STARFIELD_MATERIAL_NAME |
| Material used to draw all the points. | |
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. | |
Point starfield class.
An Ogre::ManualObject is used for drawing because billboards are too slow.
Stars are sized in pixels; this seems to work a lot better than relative sizes. Stars could be made even smaller but it would require hinting (nudging pixel coordinates to match actual screen pixels). Points are hard.
Loading a bright-star catalogue is supported but star positions are likely only correct relative to each other. External rotation is probably wrong.
| Caelum::PointStarfield::PointStarfield | ( | Ogre::SceneManager * | sceneMgr, |
| Ogre::SceneNode * | caelumRootNode, | ||
| bool | initWithCatalogue = true |
||
| ) |
Constructor.
By default this loads some reasonable defaults and the bright star catalogue.
|
inline |
Get a reference to the vector of stars.
You can freely modify this; but you need to updateStars when you're done.
| void Caelum::PointStarfield::addBrightStarCatalogue | ( | int | count = BrightStarCatalogueSize | ) |
Add stars from the bright star catalogue.
| count | Number of stars to add (in order of brightness). |
| void Caelum::PointStarfield::update | ( | LongReal | julDay | ) |
Update function; called from CaelumSystem::updateSubcomponents.
| julDay | Julian day and time. |
|
inline |
Magnitude power scale.
Star magnitudes are logarithming; one magnitude difference means a star is 2.512 times brighter. This property allows tweaking that value.