Stellarium  0.90.0
List of all members | Classes | Public Types | Public Member Functions
S3DScene Class Reference

Classes

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. More...
 
void setViewerPositionOnHeightmap (const Vec2d &pos)
 Sets the viewer foot position on the given x/y point on the heightmap. More...
 
const Vec3dgetViewerPosition () const
 Get current viewer foot position. More...
 
Vec2d getViewer2DPosition () const
 Returns the viewer foot position, without the height. More...
 
const Vec3dgetEyePosition () const
 Get current eye position (= foot position + eye height) More...
 
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. More...
 
bool isGLReady () const
 Returns true if the scene is ready for GL rendering (glLoad succeded) More...
 
void glBind ()
 
void glRelease ()
 
void glDraw (int offset, int count) const
 

Detailed Description

Definition at line 34 of file S3DScene.hpp.

Member Function Documentation

const Vec3d& S3DScene::getEyePosition ( ) const
inline

Get current eye position (= foot position + eye height)

Definition at line 137 of file S3DScene.hpp.

Vec2d S3DScene::getViewer2DPosition ( ) const
inline

Returns the viewer foot position, without the height.

Definition at line 135 of file S3DScene.hpp.

const Vec3d& S3DScene::getViewerPosition ( ) const
inline

Get current viewer foot position.

Definition at line 133 of file S3DScene.hpp.

bool S3DScene::glLoad ( )

Makes the scene ready for GL rendering. Needs a valid GL context.

bool S3DScene::isGLReady ( ) const
inline

Returns true if the scene is ready for GL rendering (glLoad succeded)

Definition at line 151 of file S3DScene.hpp.

void S3DScene::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.

The foot height is set to the heightmap position.

void S3DScene::setViewerPosition ( const Vec3d pos)

Sets the viewer (foot) position.

void S3DScene::setViewerPositionOnHeightmap ( const Vec2d pos)

Sets the viewer foot position on the given x/y point on the heightmap.


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