Stellarium  0.17.0
Data Structures | Public Types | Public Member Functions
S3DScene Class Reference

Data Structures

struct  Material
 Extension of StelOBJ::Material which provides Scenery3d specific stuff. More...

Public Types

typedef QVector< MaterialMaterialList
typedef StelOBJ::ObjectList ObjectList

Public Member Functions

 S3DScene (const SceneInfo &info)
void setModel (const StelOBJ &model)
void setGround (const StelOBJ &ground)
const SceneInfogetSceneInfo () const
MaterialList & getMaterialList ()
const MaterialgetMaterial (int index) const
const ObjectList & getObjects () const
void moveViewer (const Vec3d &moveView)
 Moves the viewer according to the given move vector (which is specified relative to the view direction and current position) The 3rd component of the vector specifies the eye height change. More...
void setViewerPosition (const Vec3d &pos)
 Sets the viewer (foot) position.
void setViewerPositionOnHeightmap (const Vec2d &pos)
 Sets the viewer foot position on the given x/y point on the heightmap.
const Vec3dgetViewerPosition () const
 Get current viewer foot position.
Vec2d getViewer2DPosition () const
 Returns the viewer foot position, without the height.
const Vec3dgetEyePosition () const
 Get current eye position (= foot position + eye height)
double getEyeHeight () const
void setEyeHeight (double height)
const AABBoxgetSceneAABB () const
float getGroundHeightAtViewer () const
void setViewDirection (const Vec3d &viewDir)
const Vec3dgetViewDirection () const
Vec3d getGridPosition () const
void setGridPosition (const Vec3d &gridPos)
bool glLoad ()
 Makes the scene ready for GL rendering. Needs a valid GL context.
bool isGLReady () const
 Returns true if the scene is ready for GL rendering (glLoad succeded)
void glBind ()
void glRelease ()
void glDraw (int offset, int count) const

Member Function Documentation

void S3DScene::moveViewer ( const Vec3d moveView)

The foot height is set to the heightmap position.