![]() |
Stellarium 0.12.0 | ||
| Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · Renderer · File Structure |
Manages the head movements and zoom operations. More...
#include <StelMovementMgr.hpp>
Classes | |
| struct | AutoMove |
| struct | AutoZoom |
| struct | DragHistoryEntry |
Public Types | |
| enum | MountMode { MountAltAzimuthal, MountEquinoxEquatorial, MountGalactic } |
Possible mount modes defining the reference frame in which head movements occur. More... | |
Public Slots | |
| void | toggleMountMode () |
| Toggle current mount mode between equatorial and altazimuthal. | |
| void | setEquatorialMount (bool b) |
| Define whether we should use equatorial mount or altazimuthal. | |
| void | setFlagTracking (bool b=true) |
| Set object tracking on/off and go to selected object. | |
| bool | getFlagTracking (void) const |
| Get current object tracking status. | |
| void | setFlagLockEquPos (bool b) |
| Set whether sky position is to be locked. | |
| bool | getFlagLockEquPos (void) const |
| Get whether sky position is locked. | |
| void | panView (double deltaAz, double deltaAlt) |
| Move view in alt/az (or equatorial if in that mode) coordinates. | |
| void | setAutoMoveDuration (float f) |
| Set automove duration in seconds. | |
| float | getAutoMoveDuration (void) const |
| Get automove duration in seconds. | |
| void | setFlagAutoZoomOutResetsDirection (bool b) |
| Set whether auto zoom out will reset the viewing direction to the inital value. | |
| bool | getFlagAutoZoomOutResetsDirection (void) |
| Get whether auto zoom out will reset the viewing direction to the inital value. | |
| bool | getFlagEnableZoomKeys () const |
| Get whether keys can control zoom. | |
| void | setFlagEnableZoomKeys (bool b) |
| Set whether keys can control zoom. | |
| bool | getFlagEnableMoveKeys () const |
| Get whether keys can control move. | |
| void | setFlagEnableMoveKeys (bool b) |
| Set whether keys can control movement. | |
| bool | getFlagEnableMoveAtScreenEdge () const |
| Get whether being at the edge of the screen activates movement. | |
| void | setFlagEnableMoveAtScreenEdge (bool b) |
| Set whether being at the edge of the screen activates movement. | |
| bool | getFlagEnableMouseNavigation () const |
| Get whether mouse can control movement. | |
| void | setFlagEnableMouseNavigation (bool b) |
| Set whether mouse can control movement. | |
| void | moveToJ2000 (const Vec3d &aim, float moveDuration=1., int zooming=0) |
| Move the view to a specified J2000 position. | |
| void | moveToObject (const StelObjectP &target, float moveDuration=1., int zooming=0) |
| void | zoomTo (double aimFov, float moveDuration=1.) |
| Change the zoom level. | |
| double | getCurrentFov () const |
| Get the current Field Of View in degrees. | |
| double | getInitFov () const |
| Return the initial default FOV in degree. | |
| void | setInitFov (double fov) |
| Set the initial Field Of View in degree. | |
| const Vec3d & | getInitViewingDirection () |
| Return the inital viewing direction in altazimuthal coordinates. | |
| void | setInitViewDirectionToCurrent () |
| Sets the initial direction of view to the current altitude and azimuth. | |
| Vec3d | getViewDirectionJ2000 () const |
| Return the current viewing direction in equatorial J2000 frame. | |
| void | setViewDirectionJ2000 (const Vec3d &v) |
| void | setMaxFov (double max) |
| Set the maximum field of View in degrees. | |
| double | getMaxFov (void) const |
| Get the maximum field of View in degrees. | |
| 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. | |
| void | autoZoomOut (float moveDuration=1.f, bool full=0) |
| Unzoom to the previous position. | |
| double | getAimFov (void) const |
| If currently zooming, return the target FOV, otherwise return current FOV in degree. | |
| void | turnRight (bool) |
| Viewing direction function : true move, false stop. | |
| 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. | |
| MountMode | getMountMode (void) const |
| Get current mount type defining the reference frame in which head movements occur. | |
| 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:
| |
| virtual void | update (double) |
| Update time-dependent things (does nothing). | |
| virtual void | draw (StelCore *, class StelRenderer *) |
| Implement required draw function. Does nothing. | |
| virtual void | handleKeys (QKeyEvent *event) |
| Handle keyboard events. | |
| virtual bool | handleMouseMoves (int x, int y, Qt::MouseButtons b) |
| Handle mouse movement events. | |
| virtual void | handleMouseWheel (class QWheelEvent *event) |
| Handle mouse wheel events. | |
| virtual void | handleMouseClicks (class QMouseEvent *event) |
| Handle mouse click events. | |
| void | updateMotion (double deltaTime) |
| Increment/decrement smoothly the vision field and position. | |
| bool | getHasDragged () const |
| double | getZoomSpeed () |
| Get the zoom speed. | |
| Vec3d | getViewUpVectorJ2000 () const |
| Return the current up view vector. | |
| void | setViewUpVectorJ2000 (const Vec3d &up) |
| void | setMovementSpeedFactor (float s) |
| float | getMovementSpeedFactor () const |
| void | setDragTriggerDistance (float d) |
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 36 of file StelMovementMgr.hpp.
| 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.
| virtual void StelMovementMgr::draw | ( | StelCore * | , | |
| class StelRenderer * | ||||
| ) | [inline, virtual] |
Implement required draw function. Does nothing.
Reimplemented from StelModule.
Definition at line 56 of file StelMovementMgr.hpp.
| double StelMovementMgr::getAimFov | ( | void | ) | const [slot] |
If currently zooming, return the target FOV, otherwise return current FOV in degree.
| float StelMovementMgr::getAutoMoveDuration | ( | void | ) | const [inline, slot] |
Get automove duration in seconds.
Definition at line 115 of file StelMovementMgr.hpp.
| double StelMovementMgr::getCurrentFov | ( | ) | const [inline, slot] |
Get the current Field Of View in degrees.
Definition at line 154 of file StelMovementMgr.hpp.
| bool StelMovementMgr::getFlagAutoZoomOutResetsDirection | ( | void | ) | [inline, slot] |
Get whether auto zoom out will reset the viewing direction to the inital value.
Definition at line 120 of file StelMovementMgr.hpp.
| bool StelMovementMgr::getFlagEnableMouseNavigation | ( | ) | const [inline, slot] |
Get whether mouse can control movement.
Definition at line 138 of file StelMovementMgr.hpp.
| bool StelMovementMgr::getFlagEnableMoveAtScreenEdge | ( | ) | const [inline, slot] |
Get whether being at the edge of the screen activates movement.
Definition at line 133 of file StelMovementMgr.hpp.
| bool StelMovementMgr::getFlagEnableMoveKeys | ( | ) | const [inline, slot] |
Get whether keys can control move.
Definition at line 128 of file StelMovementMgr.hpp.
| bool StelMovementMgr::getFlagEnableZoomKeys | ( | ) | const [inline, slot] |
Get whether keys can control zoom.
Definition at line 123 of file StelMovementMgr.hpp.
| bool StelMovementMgr::getFlagLockEquPos | ( | void | ) | const [inline, slot] |
Get whether sky position is locked.
Definition at line 102 of file StelMovementMgr.hpp.
| bool StelMovementMgr::getFlagTracking | ( | void | ) | const [inline, slot] |
Get current object tracking status.
Definition at line 97 of file StelMovementMgr.hpp.
| double StelMovementMgr::getInitFov | ( | ) | const [inline, slot] |
Return the initial default FOV in degree.
Definition at line 157 of file StelMovementMgr.hpp.
| const Vec3d& StelMovementMgr::getInitViewingDirection | ( | ) | [inline, slot] |
Return the inital viewing direction in altazimuthal coordinates.
Definition at line 162 of file StelMovementMgr.hpp.
| double StelMovementMgr::getMaxFov | ( | void | ) | const [inline, slot] |
Get the maximum field of View in degrees.
Definition at line 174 of file StelMovementMgr.hpp.
| MountMode StelMovementMgr::getMountMode | ( | void | ) | const [inline, slot] |
Get current mount type defining the reference frame in which head movements occur.
Definition at line 196 of file StelMovementMgr.hpp.
| Vec3d StelMovementMgr::getViewDirectionJ2000 | ( | ) | const [inline, slot] |
Return the current viewing direction in equatorial J2000 frame.
Definition at line 168 of file StelMovementMgr.hpp.
| Vec3d StelMovementMgr::getViewUpVectorJ2000 | ( | ) | const |
Return the current up view vector.
| double StelMovementMgr::getZoomSpeed | ( | ) | [inline] |
Get the zoom speed.
Definition at line 77 of file StelMovementMgr.hpp.
| virtual void StelMovementMgr::handleKeys | ( | QKeyEvent * | event | ) | [virtual] |
Handle keyboard events.
Reimplemented from StelModule.
| virtual void StelMovementMgr::handleMouseClicks | ( | class QMouseEvent * | event | ) | [virtual] |
Handle mouse click 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::init | ( | ) | [virtual] |
Initializes the object based on the application settings Includes:
Implements StelModule.
| void StelMovementMgr::moveToJ2000 | ( | const Vec3d & | aim, | |
| float | moveDuration = 1., |
|||
| int | zooming = 0 | |||
| ) | [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 | ??? |
| 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.
| 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.
| f | the number of seconds it takes for an auto-move operation to complete. |
Definition at line 112 of file StelMovementMgr.hpp.
| void StelMovementMgr::setEquatorialMount | ( | bool | b | ) | [inline, slot] |
Define whether we should use equatorial mount or altazimuthal.
Definition at line 92 of file StelMovementMgr.hpp.
| void StelMovementMgr::setFlagAutoZoomOutResetsDirection | ( | bool | b | ) | [inline, slot] |
Set whether auto zoom out will reset the viewing direction to the inital value.
Definition at line 118 of file StelMovementMgr.hpp.
| void StelMovementMgr::setFlagEnableMouseNavigation | ( | bool | b | ) | [inline, slot] |
Set whether mouse can control movement.
Definition at line 140 of file StelMovementMgr.hpp.
| void StelMovementMgr::setFlagEnableMoveAtScreenEdge | ( | bool | b | ) | [inline, slot] |
Set whether being at the edge of the screen activates movement.
Definition at line 135 of file StelMovementMgr.hpp.
| void StelMovementMgr::setFlagEnableMoveKeys | ( | bool | b | ) | [inline, slot] |
Set whether keys can control movement.
Definition at line 130 of file StelMovementMgr.hpp.
| void StelMovementMgr::setFlagEnableZoomKeys | ( | bool | b | ) | [inline, slot] |
Set whether keys can control zoom.
Definition at line 125 of file StelMovementMgr.hpp.
| void StelMovementMgr::setFlagLockEquPos | ( | bool | b | ) | [slot] |
Set whether sky position is to be locked.
| void StelMovementMgr::setFlagTracking | ( | bool | b = true |
) | [slot] |
Set object tracking on/off and go to selected object.
| void StelMovementMgr::setInitFov | ( | double | fov | ) | [inline, slot] |
Set the initial Field Of View in degree.
Definition at line 159 of file StelMovementMgr.hpp.
| void StelMovementMgr::setInitViewDirectionToCurrent | ( | ) | [slot] |
Sets the initial direction of view to the current altitude and azimuth.
Note: Updates the configuration file.
| void StelMovementMgr::setMaxFov | ( | double | max | ) | [slot] |
Set the maximum field of View in degrees.
| void StelMovementMgr::setMountMode | ( | MountMode | m | ) | [slot] |
Set current mount type defining the reference frame in which head movements occur.
| void StelMovementMgr::toggleMountMode | ( | ) | [inline, slot] |
Toggle current mount mode between equatorial and altazimuthal.
Definition at line 90 of file StelMovementMgr.hpp.
| void StelMovementMgr::turnRight | ( | bool | ) | [slot] |
Viewing direction function : true move, false stop.
| virtual void StelMovementMgr::update | ( | double | ) | [inline, virtual] |
Update time-dependent things (does nothing).
Implements StelModule.
Definition at line 54 of file StelMovementMgr.hpp.
| void StelMovementMgr::updateMotion | ( | double | deltaTime | ) |
Increment/decrement smoothly the vision field and position.
| void StelMovementMgr::zoomTo | ( | double | aimFov, | |
| float | moveDuration = 1. | |||
| ) | [slot] |
Change the zoom level.
| aimFov | The desired field of view in degrees. | |
| moveDuration | The time that the operation should take to complete. |
1.6.3