Stellarium 0.14.3
List of all members | Classes | Public Types | Public Member Functions
Scenery3d Class Reference

Representation of a complete 3D scenery. More...

#include <Scenery3d.hpp>

Public Types

enum  ShadowCaster { None, Sun, Moon, Venus }
 

Public Member Functions

 Scenery3d (Scenery3dMgr *parent)
 Initializes an empty Scenery3d object. More...
 
bool loadScene (const SceneInfo &scene)
 Loads the specified scene. More...
 
void handleKeys (QKeyEvent *e)
 Walk/Fly Navigation with Ctrl+Cursor and Ctrl+PgUp/Dn keys. More...
 
void update (double deltaTime)
 Update method, called by Scenery3dMgr. More...
 
void drawCoordinatesText ()
 Draw observer grid coordinates as text. More...
 
void drawDebug ()
 Draw some text output. This can be filled as needed by development. More...
 
void draw (StelCore *core)
 Draw scenery, called by Scenery3dMgr. More...
 
void init ()
 Performs initialization that requires an valid OpenGL context. More...
 
SceneInfo getCurrentScene ()
 Gets the current scene's metadata. More...
 
bool getDebugEnabled () const
 
void setDebugEnabled (bool debugEnabled)
 
bool getPixelLightingEnabled () const
 
void setPixelLightingEnabled (const bool val)
 
bool getShadowsEnabled (void) const
 
void setShadowsEnabled (bool shadowsEnabled)
 
bool getUseSimpleShadows () const
 
void setUseSimpleShadows (bool val)
 
bool getBumpsEnabled (void) const
 
void setBumpsEnabled (bool bumpsEnabled)
 
bool getTorchEnabled (void) const
 
void setTorchEnabled (bool torchEnabled)
 
S3DEnum::ShadowFilterQuality getShadowFilterQuality () const
 
void setShadowFilterQuality (S3DEnum::ShadowFilterQuality quality)
 
bool getPCSS () const
 
void setPCSS (bool val)
 
bool getLocationInfoEnabled (void) const
 
void setLocationInfoEnabled (bool locationinfoenabled)
 
bool getLazyCubemapEnabled () const
 
void setLazyCubemapEnabled (bool val)
 
double getLazyCubemapInterval () const
 
void setLazyCubemapInterval (double val)
 
void getLazyCubemapUpdateOnlyDominantFaceOnMoving (bool &val, bool &alsoSecondDominantFace)
 
void setLazyCubemapUpdateOnlyDominantFaceOnMoving (bool val, bool alsoSecondDominantFace)
 
void invalidateCubemap ()
 Does a cubemap redraw at the next possible opportunity when lazy-drawing is enabled. More...
 
S3DEnum::CubemappingMode getCubemappingMode () const
 
void setCubemappingMode (S3DEnum::CubemappingMode mode)
 Changes cubemapping mode and forces re-initialization on next draw call. More...
 
void setUseFullCubemapShadows (bool val)
 
bool getUseFullCubemapShadows () const
 
uint getCubemapSize () const
 
void setCubemapSize (uint size)
 Note: This may not set the size to the desired one because of hardware limits, call getCubemapSize to receive the value set after this call. More...
 
uint getShadowmapSize () const
 
void setShadowmapSize (uint size)
 Note: This may not set the size to the desired one because of hardware limits, call getShadowmapSize to receive the value set after this call. More...
 
float getTorchBrightness () const
 
void setTorchBrightness (float brightness)
 
float getTorchRange () const
 
void setTorchRange (float range)
 
void setLoadCancel (bool val)
 
void setGridPosition (Vec3d pos)
 Sets the observer position to the specified grid coordinates. More...
 
Vec3d getCurrentGridPosition () const
 Gets the current position on the scene's grid (height at feet) More...
 
void setEyeHeight (const float eyeheight)
 Sets the observer eye height. More...
 
float getEyeHeight () const
 Gets the current observer eye height (vertical difference from feet to camera position). More...
 
ShaderMgrgetShaderManager ()
 Returns the shader manager this instance uses. More...
 
void finalizeLoad ()
 Loads the model into GL and sets the loaded scene to be the current one. More...
 
bool isGeometryShaderCubemapSupported ()
 
bool areShadowsSupported ()
 
bool isShadowFilteringSupported ()
 
bool isANGLEContext ()
 
unsigned int getMaximumFramebufferSize ()
 

Detailed Description

Representation of a complete 3D scenery.

Definition at line 46 of file Scenery3d.hpp.

Constructor & Destructor Documentation

Scenery3d::Scenery3d ( Scenery3dMgr parent)

Initializes an empty Scenery3d object.

Member Function Documentation

void Scenery3d::draw ( StelCore core)

Draw scenery, called by Scenery3dMgr.

void Scenery3d::drawCoordinatesText ( )

Draw observer grid coordinates as text.

void Scenery3d::drawDebug ( )

Draw some text output. This can be filled as needed by development.

void Scenery3d::finalizeLoad ( )

Loads the model into GL and sets the loaded scene to be the current one.

Vec3d Scenery3d::getCurrentGridPosition ( ) const

Gets the current position on the scene's grid (height at feet)

SceneInfo Scenery3d::getCurrentScene ( )
inline

Gets the current scene's metadata.

Definition at line 76 of file Scenery3d.hpp.

float Scenery3d::getEyeHeight ( ) const
inline

Gets the current observer eye height (vertical difference from feet to camera position).

Definition at line 152 of file Scenery3d.hpp.

ShaderMgr& Scenery3d::getShaderManager ( )
inline

Returns the shader manager this instance uses.

Definition at line 157 of file Scenery3d.hpp.

void Scenery3d::handleKeys ( QKeyEvent *  e)

Walk/Fly Navigation with Ctrl+Cursor and Ctrl+PgUp/Dn keys.

Pressing Ctrl-Alt: 5x, Ctrl-Shift: 10x speedup; Ctrl-Shift-Alt: 50x! To allow fine control, zoom in. If you release Ctrl key while pressing cursor key, movement will continue.

void Scenery3d::init ( )

Performs initialization that requires an valid OpenGL context.

void Scenery3d::invalidateCubemap ( )
inline

Does a cubemap redraw at the next possible opportunity when lazy-drawing is enabled.

Definition at line 107 of file Scenery3d.hpp.

bool Scenery3d::loadScene ( const SceneInfo scene)

Loads the specified scene.

void Scenery3d::setCubemappingMode ( S3DEnum::CubemappingMode  mode)
inline

Changes cubemapping mode and forces re-initialization on next draw call.

This may not set the actual mode to the parameter, call getCubemappingMode to find out what was set.

Definition at line 112 of file Scenery3d.hpp.

void Scenery3d::setCubemapSize ( uint  size)
inline

Note: This may not set the size to the desired one because of hardware limits, call getCubemapSize to receive the value set after this call.

Definition at line 132 of file Scenery3d.hpp.

void Scenery3d::setEyeHeight ( const float  eyeheight)
inline

Sets the observer eye height.

Definition at line 150 of file Scenery3d.hpp.

void Scenery3d::setGridPosition ( Vec3d  pos)

Sets the observer position to the specified grid coordinates.

The height is assumed to be at the feet, so make sure to set the eye height with setEyeHeight before, if necessary.

void Scenery3d::setShadowmapSize ( uint  size)
inline

Note: This may not set the size to the desired one because of hardware limits, call getShadowmapSize to receive the value set after this call.

Definition at line 135 of file Scenery3d.hpp.

void Scenery3d::update ( double  deltaTime)

Update method, called by Scenery3dMgr.

Shifts observer position due to movement through the landscape.


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