Stellarium 0.13.3
|
Manages the head movements and zoom operations. More...
#include <StelMovementMgr.hpp>
Public Types | |
enum | MountMode { MountAltAzimuthal, MountEquinoxEquatorial, MountGalactic } |
Possible mount modes defining the reference frame in which head movements occur. More... | |
Public Types inherited from StelModule | |
enum | StelModuleSelectAction { AddToSelection, ReplaceSelection, RemoveFromSelection } |
Enum used when selecting objects to define whether to add to, replace, or remove from the existing selection list. More... | |
enum | StelModuleActionName { ActionDraw, ActionUpdate, ActionHandleMouseClicks, ActionHandleMouseMoves, ActionHandleKeys } |
Define the possible action for which an order is defined. More... | |
Public Slots | |
void | toggleMountMode () |
Toggle current mount mode between equatorial and altazimuthal. More... | |
void | setEquatorialMount (bool b) |
Define whether we should use equatorial mount or altazimuthal. More... | |
void | setFlagTracking (bool b=true) |
Set object tracking on/off and go to selected object. More... | |
bool | getFlagTracking (void) const |
Get current object tracking status. More... | |
void | setFlagLockEquPos (bool b) |
Set whether sky position is to be locked. More... | |
bool | getFlagLockEquPos (void) const |
Get whether sky position is locked. More... | |
void | panView (double deltaAz, double deltaAlt) |
Move view in alt/az (or equatorial if in that mode) coordinates. More... | |
void | setAutoMoveDuration (float f) |
Set automove duration in seconds. More... | |
float | getAutoMoveDuration (void) const |
Get automove duration in seconds. More... | |
void | setFlagAutoZoomOutResetsDirection (bool b) |
Set whether auto zoom out will reset the viewing direction to the inital value. More... | |
bool | getFlagAutoZoomOutResetsDirection (void) |
Get whether auto zoom out will reset the viewing direction to the inital value. More... | |
bool | getFlagEnableZoomKeys () const |
Get whether keys can control zoom. More... | |
void | setFlagEnableZoomKeys (bool b) |
Set whether keys can control zoom. More... | |
bool | getFlagEnableMoveKeys () const |
Get whether keys can control movement. More... | |
void | setFlagEnableMoveKeys (bool b) |
Set whether keys can control movement. More... | |
bool | getFlagEnableMoveAtScreenEdge () const |
Get whether being at the edge of the screen activates movement. More... | |
void | setFlagEnableMoveAtScreenEdge (bool b) |
Set whether being at the edge of the screen activates movement. More... | |
bool | getFlagEnableMouseNavigation () const |
Get whether mouse can control movement. More... | |
void | setFlagEnableMouseNavigation (bool b) |
Set whether mouse can control movement. More... | |
void | moveToJ2000 (const Vec3d &aim, float moveDuration=1., int zooming=0) |
Move the view to a specified J2000 position. More... | |
void | moveToObject (const StelObjectP &target, float moveDuration=1., int zooming=0) |
void | zoomTo (double aimFov, float moveDuration=1.) |
Change the zoom level. More... | |
double | getCurrentFov () const |
Get the current Field Of View in degrees. More... | |
double | getInitFov () const |
Return the initial default FOV in degree. More... | |
void | setInitFov (double fov) |
Set the initial Field Of View in degree. More... | |
const Vec3d & | getInitViewingDirection () |
Return the inital viewing direction in altazimuthal coordinates. More... | |
void | setInitViewDirectionToCurrent () |
Sets the initial direction of view to the current altitude and azimuth. More... | |
Vec3d | getViewDirectionJ2000 () const |
Return the current viewing direction in equatorial J2000 frame. More... | |
void | setViewDirectionJ2000 (const Vec3d &v) |
void | setMaxFov (double max) |
Set the maximum field of View in degrees. More... | |
double | getMaxFov (void) const |
Get the maximum field of View in degrees. More... | |
void | autoZoomIn (float moveDuration=1.f, bool allowManualZoom=1) |
Go and zoom to the selected object. A later call to autoZoomOut will come back to the previous zoom level. More... | |
void | autoZoomOut (float moveDuration=1.f, bool full=0) |
Unzoom to the previous position. More... | |
double | getAimFov (void) const |
If currently zooming, return the target FOV, otherwise return current FOV in degree. More... | |
void | turnRight (bool) |
Viewing direction function : true move, false stop. More... | |
void | turnLeft (bool) |
void | turnUp (bool) |
void | turnDown (bool) |
void | moveSlow (bool b) |
void | zoomIn (bool) |
void | zoomOut (bool) |
void | setMountMode (MountMode m) |
Set current mount type defining the reference frame in which head movements occur. More... | |
MountMode | getMountMode (void) const |
Get current mount type defining the reference frame in which head movements occur. More... | |
bool | getEquatorialMount (void) const |
void | setDragTimeMode (bool b) |
bool | getDragTimeMode () const |
Public Member Functions | |
StelMovementMgr (StelCore *core) | |
virtual void | init () |
Initializes the object based on the application settings Includes: More... | |
virtual void | update (double) |
Update time-dependent things (does nothing). More... | |
virtual void | draw (StelCore *) |
Implement required draw function. Does nothing. More... | |
virtual void | handleKeys (QKeyEvent *event) |
Handle keyboard events. More... | |
virtual bool | handleMouseMoves (int x, int y, Qt::MouseButtons b) |
Handle mouse movement events. More... | |
virtual void | handleMouseWheel (class QWheelEvent *event) |
Handle mouse wheel events. More... | |
virtual void | handleMouseClicks (class QMouseEvent *event) |
Handle mouse click events. More... | |
virtual double | getCallOrder (StelModuleActionName actionName) const |
Return the value defining the order of call for the given action For example if stars.callOrder[ActionDraw] == 10 and constellation.callOrder[ActionDraw] == 11, the stars module will be drawn before the constellations. More... | |
virtual bool | handlePinch (qreal scale, bool started) |
Handle pinch gesture. More... | |
void | updateMotion (double deltaTime) |
Increment/decrement smoothly the vision field and position. More... | |
bool | getHasDragged () const |
double | getZoomSpeed () |
Get the zoom speed. More... | |
Vec3d | getViewUpVectorJ2000 () const |
Return the current up view vector. More... | |
void | setViewUpVectorJ2000 (const Vec3d &up) |
void | setMovementSpeedFactor (float s) |
float | getMovementSpeedFactor () const |
void | setDragTriggerDistance (float d) |
Public Member Functions inherited from StelModule | |
virtual void | deinit () |
Called before the module will be delete, and before the openGL context is suppressed. More... | |
virtual QString | getModuleVersion () const |
Get the version of the module, default is stellarium main version. More... | |
virtual QString | getAuthorName () const |
Get the name of the module author. More... | |
virtual QString | getAuthorEmail () const |
Get the email adress of the module author. More... | |
virtual bool | configureGui (bool show=true) |
Detect or show the configuration GUI elements for the module. More... | |
Properties | |
bool | equatorialMount |
bool | tracking |
Additional Inherited Members | |
Protected Member Functions inherited from StelModule | |
class StelAction * | addAction (const QString &id, const QString &groupId, const QString &text, QObject *target, const char *slot, const QString &shortcut="", const QString &altShortcut="") |
convenience methods to add an action to the StelActionMgr object. More... | |
class StelAction * | addAction (const QString &id, const QString &groupId, const QString &text, const char *slot, const QString &shortcut="", const QString &altShortcut="") |
convenience methods to add an action to the StelActionMgr object. More... | |
Manages the head movements and zoom operations.
Definition at line 29 of file StelMovementMgr.hpp.
Possible mount modes defining the reference frame in which head movements occur.
Definition at line 41 of file StelMovementMgr.hpp.
|
slot |
Go and zoom to the selected object. A later call to autoZoomOut will come back to the previous zoom level.
|
slot |
Unzoom to the previous position.
|
inlinevirtual |
Implement required draw function. Does nothing.
Reimplemented from StelModule.
Definition at line 61 of file StelMovementMgr.hpp.
|
slot |
If currently zooming, return the target FOV, otherwise return current FOV in degree.
|
inlineslot |
Get automove duration in seconds.
Definition at line 124 of file StelMovementMgr.hpp.
|
virtual |
Return the value defining the order of call for the given action For example if stars.callOrder[ActionDraw] == 10 and constellation.callOrder[ActionDraw] == 11, the stars module will be drawn before the constellations.
actionName | the name of the action for which we want the call order |
Reimplemented from StelModule.
|
inlineslot |
Get the current Field Of View in degrees.
Definition at line 163 of file StelMovementMgr.hpp.
|
inlineslot |
Get whether auto zoom out will reset the viewing direction to the inital value.
Definition at line 129 of file StelMovementMgr.hpp.
|
inlineslot |
Get whether mouse can control movement.
Definition at line 147 of file StelMovementMgr.hpp.
|
inlineslot |
Get whether being at the edge of the screen activates movement.
Definition at line 142 of file StelMovementMgr.hpp.
|
inlineslot |
Get whether keys can control movement.
Definition at line 137 of file StelMovementMgr.hpp.
|
inlineslot |
Get whether keys can control zoom.
Definition at line 132 of file StelMovementMgr.hpp.
|
inlineslot |
Get whether sky position is locked.
Definition at line 111 of file StelMovementMgr.hpp.
|
inlineslot |
Get current object tracking status.
Definition at line 106 of file StelMovementMgr.hpp.
|
inlineslot |
Return the initial default FOV in degree.
Definition at line 166 of file StelMovementMgr.hpp.
|
inlineslot |
Return the inital viewing direction in altazimuthal coordinates.
Definition at line 171 of file StelMovementMgr.hpp.
|
inlineslot |
Get the maximum field of View in degrees.
Definition at line 183 of file StelMovementMgr.hpp.
|
inlineslot |
Get current mount type defining the reference frame in which head movements occur.
Definition at line 205 of file StelMovementMgr.hpp.
|
inlineslot |
Return the current viewing direction in equatorial J2000 frame.
Definition at line 177 of file StelMovementMgr.hpp.
Vec3d StelMovementMgr::getViewUpVectorJ2000 | ( | ) | const |
Return the current up view vector.
|
inline |
Get the zoom speed.
Definition at line 86 of file StelMovementMgr.hpp.
|
virtual |
Handle keyboard events.
Reimplemented from StelModule.
|
virtual |
Handle mouse click events.
Reimplemented from StelModule.
|
virtual |
Handle mouse movement events.
Reimplemented from StelModule.
|
virtual |
Handle mouse wheel events.
Reimplemented from StelModule.
|
virtual |
Handle pinch gesture.
Reimplemented from StelModule.
|
virtual |
Initializes the object based on the application settings Includes:
Implements StelModule.
|
slot |
Move the view to a specified J2000 position.
aim | The position to move to expressed as a vector. |
moveDuration | The time it takes for the move to complete. |
zooming | ??? |
|
slot |
Move view in alt/az (or equatorial if in that mode) coordinates.
Changes to viewing direction are instantaneous.
deltaAz | change in azimuth angle in radians |
deltaAlt | change in altitude angle in radians |
|
inlineslot |
Set automove duration in seconds.
f | the number of seconds it takes for an auto-move operation to complete. |
Definition at line 121 of file StelMovementMgr.hpp.
|
inlineslot |
Define whether we should use equatorial mount or altazimuthal.
Definition at line 101 of file StelMovementMgr.hpp.
|
inlineslot |
Set whether auto zoom out will reset the viewing direction to the inital value.
Definition at line 127 of file StelMovementMgr.hpp.
|
inlineslot |
Set whether mouse can control movement.
Definition at line 149 of file StelMovementMgr.hpp.
|
inlineslot |
Set whether being at the edge of the screen activates movement.
Definition at line 144 of file StelMovementMgr.hpp.
|
inlineslot |
Set whether keys can control movement.
Definition at line 139 of file StelMovementMgr.hpp.
|
inlineslot |
Set whether keys can control zoom.
Definition at line 134 of file StelMovementMgr.hpp.
|
slot |
Set whether sky position is to be locked.
|
slot |
Set object tracking on/off and go to selected object.
|
inlineslot |
Set the initial Field Of View in degree.
Definition at line 168 of file StelMovementMgr.hpp.
|
slot |
Sets the initial direction of view to the current altitude and azimuth.
Note: Updates the configuration file.
|
slot |
Set the maximum field of View in degrees.
|
slot |
Set current mount type defining the reference frame in which head movements occur.
|
inlineslot |
Toggle current mount mode between equatorial and altazimuthal.
Definition at line 99 of file StelMovementMgr.hpp.
|
slot |
Viewing direction function : true move, false stop.
|
inlinevirtual |
Update time-dependent things (does nothing).
Implements StelModule.
Definition at line 59 of file StelMovementMgr.hpp.
void StelMovementMgr::updateMotion | ( | double | deltaTime | ) |
Increment/decrement smoothly the vision field and position.
|
slot |
Change the zoom level.
aimFov | The desired field of view in degrees. |
moveDuration | The time that the operation should take to complete. |