Stellarium 0.11.0
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure
Classes | Public Types | Public Slots | Public Member Functions

StelMovementMgr Class Reference

Manages the head movements and zoom operations. More...

#include <StelMovementMgr.hpp>

List of all members.

Classes

struct  AutoMove
struct  AutoZoom
struct  DragHistoryEntry

Public Types

enum  MountMode { MountAltAzimuthal, MountEquinoxEquatorial, MountGalactic }

Public Slots

void toggleMountMode ()
void setEquatorialMount (bool b)
void setFlagTracking (bool b=true)
bool getFlagTracking (void) const
void setFlagLockEquPos (bool b)
bool getFlagLockEquPos (void) const
void panView (double deltaAz, double deltaAlt)
void setAutoMoveDuration (float f)
float getAutoMoveDuration (void) const
void setFlagAutoZoomOutResetsDirection (bool b)
bool getFlagAutoZoomOutResetsDirection (void)
bool getFlagEnableZoomKeys () const
void setFlagEnableZoomKeys (bool b)
bool getFlagEnableMoveKeys () const
void setFlagEnableMoveKeys (bool b)
bool getFlagEnableMoveAtScreenEdge () const
void setFlagEnableMoveAtScreenEdge (bool b)
bool getFlagEnableMouseNavigation () const
void setFlagEnableMouseNavigation (bool b)
void moveToJ2000 (const Vec3d &aim, float moveDuration=1., int zooming=0)
void moveToObject (const StelObjectP &target, float moveDuration=1., int zooming=0)
void zoomTo (double aimFov, float moveDuration=1.)
double getCurrentFov () const
double getInitFov () const
void setInitFov (double fov)
const Vec3dgetInitViewingDirection ()
void setInitViewDirectionToCurrent ()
Vec3d getViewDirectionJ2000 () const
void setViewDirectionJ2000 (const Vec3d &v)
void setMaxFov (double max)
double getMaxFov (void) const
void autoZoomIn (float moveDuration=1.f, bool allowManualZoom=1)
void autoZoomOut (float moveDuration=1.f, bool full=0)
double getAimFov (void) const
void turnRight (bool)
void turnLeft (bool)
void turnUp (bool)
void turnDown (bool)
void moveSlow (bool b)
void zoomIn (bool)
void zoomOut (bool)
void setMountMode (MountMode m)
MountMode getMountMode (void) const
void setDragTimeMode (bool b)
bool getDragTimeMode () const

Public Member Functions

 StelMovementMgr (StelCore *core)
virtual void init ()
virtual void update (double)
virtual void draw (StelCore *)
virtual void handleKeys (QKeyEvent *event)
virtual bool handleMouseMoves (int x, int y, Qt::MouseButtons b)
virtual void handleMouseWheel (class QWheelEvent *event)
virtual void handleMouseClicks (class QMouseEvent *event)
void updateMotion (double deltaTime)
bool getHasDragged () const
double getZoomSpeed ()
Vec3d getViewUpVectorJ2000 () const
void setViewUpVectorJ2000 (const Vec3d &up)
void setMovementSpeedFactor (float s)
float getMovementSpeedFactor () const
void setDragTriggerDistance (float d)

Detailed Description

Manages the head movements and zoom operations.


Member Function Documentation

float StelMovementMgr::getAutoMoveDuration ( void  ) const [inline, slot]

Get automove duration in seconds.

Returns:
the number of seconds it takes for an auto-move operation to complete.
virtual void StelMovementMgr::init ( ) [virtual]

Initializes the object based on the application settings Includes:

  • Enabling/disabling the movement keys
  • Enabling/disabling the zoom keys
  • Enabling/disabling the mouse zoom
  • Enabling/disabling the mouse movement
  • Sets the zoom and movement speeds
  • Sets the auto-zoom duration and mode.

Implements StelModule.

void StelMovementMgr::moveToJ2000 ( const Vec3d aim,
float  moveDuration = 1.,
int  zooming = 0 
) [slot]

Move the view to a specified J2000 position.

Parameters:
aimThe position to move to expressed as a vector.
moveDurationThe time it takes for the move to complete.
zooming???
void StelMovementMgr::panView ( double  deltaAz,
double  deltaAlt 
) [slot]

Move view in alt/az (or equatorial if in that mode) coordinates.

Changes to viewing direction are instantaneous.

Parameters:
deltaAzchange in azimuth angle in radians
deltaAltchange in altitude angle in radians
void StelMovementMgr::setAutoMoveDuration ( float  f) [inline, slot]

Set automove duration in seconds.

Parameters:
fthe number of seconds it takes for an auto-move operation to complete.
void StelMovementMgr::setInitViewDirectionToCurrent ( ) [slot]

Sets the initial direction of view to the current altitude and azimuth.

Note: Updates the configuration file.

void StelMovementMgr::zoomTo ( double  aimFov,
float  moveDuration = 1. 
) [slot]

Change the zoom level.

Parameters:
aimFovThe desired field of view in degrees.
moveDurationThe time that the operation should take to complete.