Home · All Namespaces · All Classes · Functions · Coding Style · Plugins · File Structure

StelMovementMgr Class Reference

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

#include <StelMovementMgr.hpp>

Inherits StelModule.

List of all members.

Public Slots

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 moveTo (const Vec3d &aim, float moveDuration=1., bool localPos=false, int zooming=0)
void zoomTo (double aimFov, float moveDuration=1.)
double getCurrentFov () const
double getInitFov () const
void setInitFov (double fov)
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)

Public Member Functions

 StelMovementMgr (StelCore *core)
virtual void init ()
virtual void update (double deltaTime)
virtual void draw (StelCore *acore)
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)
virtual void selectedObjectChangeCallBack (StelModuleSelectAction action=StelModule::ReplaceSelection)
void updateMotion (double deltaTime)
bool getHasDragged () const
double getZoomSpeed ()

Classes

struct  AutoMove
struct  AutoZoom


Detailed Description

Manages the head movements and zoom operations.


Member Function Documentation

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.

virtual void StelMovementMgr::update ( double  deltaTime  )  [inline, virtual]

Update time-dependent things (does nothing).

Implements StelModule.

virtual void StelMovementMgr::draw ( StelCore acore  )  [inline, virtual]

Implement required draw function. Does nothing.

Implements StelModule.

virtual void StelMovementMgr::handleKeys ( QKeyEvent *  event  )  [virtual]

Handle keyboard events.

Reimplemented from StelModule.

virtual bool StelMovementMgr::handleMouseMoves ( int  x,
int  y,
Qt::MouseButtons  b 
) [virtual]

Handle mouse movement events.

Reimplemented from StelModule.

virtual void StelMovementMgr::handleMouseWheel ( class QWheelEvent *  event  )  [virtual]

Handle mouse wheel events.

Reimplemented from StelModule.

virtual void StelMovementMgr::handleMouseClicks ( class QMouseEvent *  event  )  [virtual]

Handle mouse click events.

Reimplemented from StelModule.

virtual void StelMovementMgr::selectedObjectChangeCallBack ( StelModuleSelectAction  action = StelModule::ReplaceSelection  )  [virtual]

Called then the selected object changes.

Reimplemented from StelModule.

void StelMovementMgr::updateMotion ( double  deltaTime  ) 

Increment/decrement smoothly the vision field and position.

double StelMovementMgr::getZoomSpeed (  )  [inline]

Get the zoom speed.

void StelMovementMgr::setFlagTracking ( bool  b = true  )  [slot]

Set object tracking on/off and go to selected object.

bool StelMovementMgr::getFlagTracking ( void   )  const [inline, slot]

Get current object tracking status.

void StelMovementMgr::setFlagLockEquPos ( bool  b  )  [inline, slot]

Set whether sky position is to be locked.

bool StelMovementMgr::getFlagLockEquPos ( void   )  const [inline, slot]

Get whether sky position is locked.

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:
deltaAz change in azimuth angle in radians
deltaAlt change in altitude angle in radians

void StelMovementMgr::setAutoMoveDuration ( float  f  )  [inline, slot]

Set automove duration in seconds.

Parameters:
f the number of seconds it takes for an auto-move operation to complete.

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.

void StelMovementMgr::setFlagAutoZoomOutResetsDirection ( bool  b  )  [inline, slot]

Set whether auto zoom out will reset the viewing direction to the inital value.

bool StelMovementMgr::getFlagAutoZoomOutResetsDirection ( void   )  [inline, slot]

Get whether auto zoom out will reset the viewing direction to the inital value.

bool StelMovementMgr::getFlagEnableZoomKeys (  )  const [inline, slot]

Get whether keys can control zoom.

void StelMovementMgr::setFlagEnableZoomKeys ( bool  b  )  [inline, slot]

Set whether keys can control zoom.

bool StelMovementMgr::getFlagEnableMoveKeys (  )  const [inline, slot]

Get whether keys can control move.

void StelMovementMgr::setFlagEnableMoveKeys ( bool  b  )  [inline, slot]

Set whether keys can control movement.

bool StelMovementMgr::getFlagEnableMoveAtScreenEdge (  )  const [inline, slot]

Get whether being at the edge of the screen activates movement.

void StelMovementMgr::setFlagEnableMoveAtScreenEdge ( bool  b  )  [inline, slot]

Set whether being at the edge of the screen activates movement.

bool StelMovementMgr::getFlagEnableMouseNavigation (  )  const [inline, slot]

Get whether mouse can control movement.

void StelMovementMgr::setFlagEnableMouseNavigation ( bool  b  )  [inline, slot]

Set whether mouse can control movement.

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

Move the view to a specified position.

Uses equatorial or local coordinate depending on _localPos value.

Parameters:
aim The position to move to expressed as a vector.
moveDuration The time it takes for the move to complete.
localPos If false, use equatorial position, else use local.
zooming ???

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

Change the zoom level.

Parameters:
aimFov The desired field of view in degrees.
moveDuration The time that the operation should take to complete.

double StelMovementMgr::getCurrentFov (  )  const [inline, slot]

Get the current Field Of View in degrees.

double StelMovementMgr::getInitFov (  )  const [inline, slot]

Return the initial default FOV in degree.

void StelMovementMgr::setInitFov ( double  fov  )  [inline, slot]

Set the initial Field Of View in degree.

void StelMovementMgr::setMaxFov ( double  max  )  [slot]

Set the maximum field of View in degrees.

double StelMovementMgr::getMaxFov ( void   )  const [inline, slot]

Get the maximum field of View in degrees.

void StelMovementMgr::autoZoomIn ( float  moveDuration = 1.f,
bool  allowManualZoom = 1 
) [slot]

Go and zoom to the selected object. A later call to autoZoomOut will come back to the previous zoom level.

void StelMovementMgr::autoZoomOut ( float  moveDuration = 1.f,
bool  full = 0 
) [slot]

Unzoom to the previous position.

double StelMovementMgr::getAimFov ( void   )  const [slot]

If currently zooming, return the target FOV, otherwise return current FOV in degree.

void StelMovementMgr::turnRight ( bool   )  [slot]

Viewing direction function : true move, false stop.


Generated on Mon Mar 9 16:16:17 2009 for Stellarium by  doxygen 1.5.5