Stellarium
24.3
|
A pseudo-orbit for "observers" linked to a planet's sphere. More...
#include <StelMovementMgr.hpp>
Public Types | |
enum | MountMode { MountAltAzimuthal , MountEquinoxEquatorial , MountGalactic , MountSupergalactic } |
Possible mount modes defining the reference frame in which head movements occur. More... | |
enum | ZoomingMode { ZoomOut =-1 , ZoomNone =0 , ZoomIn =1 } |
Named constants for zoom operations. | |
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 | resetInitViewPos () |
load and process initial viewing position. Can be called later to restore original "default" view. | |
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 (const double deltaAz, const 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 initial value. | |
bool | getFlagAutoZoomOutResetsDirection (void) const |
Get whether auto zoom out will reset the viewing direction to the initial 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 movement. | |
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. | |
bool | getFlagEnableMouseZooming () const |
Get whether mouse can control zooming. | |
void | setFlagEnableMouseZooming (bool b) |
Set whether mouse can control zooming. | |
bool | getFlagIndicationMountMode () const |
Get the state of flag for indication of mount mode. | |
void | setFlagIndicationMountMode (bool b) |
Set the state of flag for indication of mount mode. | |
void | moveToJ2000 (const Vec3d &aim, const Vec3d &aimUp, float moveDuration=1., StelMovementMgr::ZoomingMode zooming=ZoomNone) |
Move the view to a specified J2000 position. More... | |
void | moveToAltAzi (const Vec3d &aim, const Vec3d &aimUp, float moveDuration=1.f, StelMovementMgr::ZoomingMode zooming=ZoomNone) |
Move the view to a specified AltAzimuthal position. More... | |
void | zoomTo (double aimFov, float zoomDuration=1.f) |
Change the zoom level. More... | |
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 () const |
Return the initial 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 the equatorial J2000 frame. More... | |
void | setViewDirectionJ2000 (const Vec3d &v) |
Set the current viewing direction in the equatorial J2000 frame. | |
void | setMaxFov (double max) |
Set the maximum field of View in degrees. | |
double | getMaxFov (void) const |
Get the maximum field of View in degrees. | |
double | getMinFov (void) const |
Get the minimum 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. | |
void | deselection (void) |
Deselect the selected object. | |
double | getAimFov (void) const |
If currently zooming, return the target FOV, otherwise return current FOV in degree. | |
void | turnRight (bool s) |
With true, starts turning the direction of view to the right, with an unspecified speed, according to the current mount mode (i.e., increasing azimuth, decreasing rectascension). More... | |
void | turnLeft (bool s) |
With true, starts turning the direction of view to the left, with an unspecified speed, and according to the current mount mode (i.e., decreasing azimuth, increasing rectascension). More... | |
void | turnUp (bool s) |
With true, starts moving the direction of the view up, with an unspecified speed, and according to the current mount mode (i.e., towards the zenith or the celestial north pole). More... | |
void | turnDown (bool s) |
With true, starts moving the direction of the view down, with an unspecified speed, and according to the current mount mode (i.e., towards the nadir or the celestial south pole). More... | |
void | moveSlow (bool b) |
void | zoomIn (bool s) |
With true, starts zooming in, with an unspecified ratio of degrees per second, either until zooming is stopped with a zoomIn call with false (or a zoomOut call). More... | |
void | zoomOut (bool s) |
With true, starts zooming out, with an unspecified ratio of degrees per second, either until zooming is stopped with a zoomIn call with false (or a zoomOut call). More... | |
void | smoothPan (double deltaX, double deltaY, double ptime, bool s) |
Smooth panning a predetermined amount. More... | |
void | lookEast (bool zero=false) |
Look immediately towards East. More... | |
void | lookWest (bool zero=false) |
Look immediately towards West. More... | |
void | lookNorth (bool zero=false) |
Look immediately towards North. More... | |
void | lookSouth (bool zero=false) |
Look immediately towards South. More... | |
void | lookZenith (void) |
Look immediately towards Zenith, turning southern horizon to screen bottom. | |
void | lookNadir (void) |
Look immediately towards Nadir, turning southern horizon to screen top. | |
void | lookTowardsNCP (void) |
Look immediately towards North Celestial pole. | |
void | lookTowardsSCP (void) |
Look immediately towards South Celestial pole. | |
void | moveViewport (double offsetX, double offsetY, const float duration=0.f) |
set or start animated move of the viewport offset. More... | |
void | setMountMode (StelMovementMgr::MountMode m) |
Set current mount type defining the reference frame in which head movements occur. | |
StelMovementMgr::MountMode | getMountMode (void) const |
Get current mount type defining the reference frame in which head movements occur. | |
bool | getEquatorialMount (void) const |
void | setInhibitAllAutomoves (bool inhibit) |
Function designed only for scripting context. More... | |
Vec2d | getViewportOffsetTarget () const |
Returns the targeted value of the viewport offset. | |
double | getViewportHorizontalOffsetTarget () const |
double | getViewportVerticalOffsetTarget () const |
void | setViewportHorizontalOffsetTarget (double f) |
void | setViewportVerticalOffsetTarget (double f) |
void | setUserMaxFov (double max) |
Set a hard limit for any fov change. More... | |
double | getUserMaxFov () const |
void | setFov (double f) |
Signals | |
void | flagTrackingChanged (bool b) |
Emitted when the tracking property changes. | |
void | equatorialMountChanged (bool b) |
void | flagIndicationMountModeChanged (bool b) |
void | flagAutoZoomOutResetsDirectionChanged (bool b) |
void | viewportHorizontalOffsetTargetChanged (double f) |
void | viewportVerticalOffsetTargetChanged (double f) |
void | flagEnableMouseNavigationChanged (bool b) |
void | flagEnableMouseZoomingChanged (bool b) |
void | flagEnableMoveKeysChanged (bool b) |
void | flagEnableZoomKeysChanged (bool b) |
void | userMaxFovChanged (double fov) |
void | currentFovChanged (double fov) |
void | currentDirectionChanged () |
Public Member Functions | |
StelMovementMgr (StelCore *core) | |
void | init () override |
Initializes the object based on the application settings Includes: More... | |
void | update (double) override |
Update time-dependent things (triggers a time dragging record if required) | |
void | draw (StelCore *) override |
Implement required draw function. Does nothing. | |
void | handleKeys (QKeyEvent *event) override |
Handle keyboard events. | |
bool | handleMouseMoves (int x, int y, Qt::MouseButtons b) override |
Handle mouse movement events. | |
void | handleMouseWheel (class QWheelEvent *event) override |
Handle mouse wheel events. | |
void | handleMouseClicks (class QMouseEvent *event) override |
Handle mouse click events. | |
double | getCallOrder (StelModuleActionName actionName) const override |
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... | |
bool | handlePinch (qreal scale, bool started) override |
Handle pinch gesture. | |
void | updateMotion (double deltaTime) |
Increment/decrement smoothly the vision field and position. Called in StelCore.update(). | |
double | getZoomSpeed () const |
Get the zoom speed. | |
Vec3d | getViewUpVectorJ2000 () const |
Return the current up view vector in J2000 coordinates. | |
void | setViewUpVectorJ2000 (const Vec3d &up) |
void | setViewUpVector (const Vec3d &up) |
void | setMovementSpeedFactor (float s) |
float | getMovementSpeedFactor () const |
void | setDragTriggerDistance (float d) |
Vec3d | j2000ToMountFrame (const Vec3d &v) const |
Vec3d | mountFrameToJ2000 (const Vec3d &v) const |
void | moveToObject (const StelObjectP &target, float moveDuration=1., ZoomingMode zooming=ZoomNone) |
Public Member Functions inherited from StelModule | |
StelModule () | |
Constructor. Every derived class MUST call setObjectName(className) in its constructor. | |
virtual void | deinit () |
Called before the module will be deleted, and before the OpenGL context is suppressed. More... | |
virtual QSettings * | getSettings () |
Return module-specific settings. More... | |
virtual QString | getModuleVersion () const |
Get the version of the module, default is stellarium main version. | |
virtual QString | getAuthorName () const |
Get the name of the module author. | |
virtual QString | getAuthorEmail () const |
Get the email address of the module author. | |
virtual bool | configureGui (bool show=true) |
Detect or show the configuration GUI elements for the module. More... | |
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 (call to slot) 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 (call to own slot) to the StelActionMgr object. More... | |
StelAction * | addAction (const QString &id, const QString &groupId, const QString &text, QObject *contextObject, std::function< void()> lambda, const QString &shortcut="", const QString &altShortcut="") |
convenience methods to add an action (call to Lambda functor) to the StelActionMgr object. More... | |
A pseudo-orbit for "observers" linked to a planet's sphere.
Manages the head movements and zoom operations.
It allows setting distance and longitude/latitude in the VSOP87 frame. This class is currently in an experimental state. rotateToVsop87 may need to be set up correctly. The view frame for an observer is correctly oriented when the observer is located on the pseudo-planet's North pole. Positional changes are currently performed with keyboard interaction (see
Possible mount modes defining the reference frame in which head movements occur.
MountGalactic and MountSupergalactic is currently only available via scripting API: core.clear("galactic") and core.clear("supergalactic")
|
inlineslot |
Get automove duration in seconds.
|
overridevirtual |
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 |
Return the initial viewing direction in altazimuthal coordinates.
See StelMovementMgr::moveToAltAzi for an explanation of the return value.
|
inlineslot |
Return the current viewing direction in the equatorial J2000 frame.
See StelMovementMgr::moveToJ2000 for an explanation of the return value.
|
overridevirtual |
Initializes the object based on the application settings Includes:
Implements StelModule.
|
slot |
Look immediately towards East.
zero | true to center on horizon, false to keep altitude, or when looking to the zenith already, turn eastern horizon to screen bottom. |
|
slot |
Look immediately towards North.
zero | true to center on horizon, false to keep altitude, or when looking to the zenith already, turn northern horizon to screen bottom. |
|
slot |
Look immediately towards South.
zero | true to center on horizon, false to keep altitude, or when looking to the zenith already, turn southern horizon to screen bottom. |
|
slot |
Look immediately towards West.
zero | true to center on horizon, false to keep altitude, or when looking to the zenith already, turn western horizon to screen bottom. |
|
slot |
Move the view to a specified AltAzimuthal position.
aim | The position to move to expressed as a vector in AltAz frame. |
aimUp | Up vector in AltAz coordinates. Can be usually (0/0/1) but may have to be exact for looking into the zenith/pole |
moveDuration | The time it takes for the move to complete. |
zooming | you want to zoom in, out or not (just center). // You can use the following code most of the times to find a valid aimUp vector:
StelMovementMgr* mvmgr = GETSTELMODULE(StelMovementMgr);
|
|
slot |
Move the view to a specified J2000 position.
aim | The position to move to expressed as a vector. |
aimUp | Up vector. Can be usually (0/0/1) but may have to be exact for looking into the zenith/pole |
moveDuration | The time it takes for the move to complete. |
zooming | you want to zoom in, out or not (just center). // You can use the following code most of the times to find a valid aimUp vector:
StelMovementMgr* mvmgr = GETSTELMODULE(StelMovementMgr);
|
|
slot |
set or start animated move of the viewport offset.
This can be used e.g. in wide cylindrical panorama screens to push the horizon down and see more of the sky. Also helpful in stereographic projection to push the horizon down and see more of the sky.
offsetX | new horizontal viewport offset, percent. clamped to [-50...50]. Probably not very useful. |
offsetY | new horizontal viewport offset, percent. clamped to [-50...50]. This is also available in the GUI. |
duration | animation duration, seconds. Optional. |
|
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. |
|
inlineslot |
Function designed only for scripting context.
Put the function into the startup.ssc of your planetarium setup, this will avoid any unwanted tracking.
|
slot |
Sets the initial direction of view to the current altitude and azimuth.
Note: Updates the configuration file.
|
slot |
Set a hard limit for any fov change.
Useful in the context of a planetarium with dome where a presenter never ever wants to set more than 180° even if the projection would allow it.
|
slot |
Smooth panning a predetermined amount.
deltaX | - delta for scale X, in degrees |
deltaY | - delta for scale Y, in degrees |
ptime | - time for doing one step of delta, in seconds |
s | - flag to enable panning |
|
slot |
With true, starts moving the direction of the view down, with an unspecified speed, and according to the current mount mode (i.e., towards the nadir or the celestial south pole).
Movement halts when the goal is reached, but the command remains active until turnDown is called with false, or turnUp with any value. While this command is active, other movement commands or mouse or keyboard operations will be countermanded by the still pending turnDown command.
s | - true move, false stop |
|
slot |
With true, starts turning the direction of view to the left, with an unspecified speed, and according to the current mount mode (i.e., decreasing azimuth, increasing rectascension).
Turning stops only due to a call to turnLeft with false (or to turnRight with any value); it does not stop when the script is terminated.
s | - true move, false stop // You can use the following code to turn the direction of the view
// "a little" to the left, by an unpredictable amount.
core.wait(0.42);
|
|
slot |
With true, starts turning the direction of view to the right, with an unspecified speed, according to the current mount mode (i.e., increasing azimuth, decreasing rectascension).
Turning stops only due to a call to turnRight with false (or to turnLeft with any value) ; it does not stop when the script is terminated.
s | - true move, false stop // You can use the following code to turn the direction of the view
// "a little" to the right, by an un predictable amount.
core.wait(0.42);
|
|
slot |
With true, starts moving the direction of the view up, with an unspecified speed, and according to the current mount mode (i.e., towards the zenith or the celestial north pole).
Movement halts when the goal is reached, but the command remains active until turnUp is called with false, or turnDown with any value. While this command is active, other movement commands or mouse or keyboard operations will be countermanded by the still pending turnUp command.
s | - true move, false stop |
|
slot |
With true, starts zooming in, with an unspecified ratio of degrees per second, either until zooming is stopped with a zoomIn call with false (or a zoomOut call).
Zooming pauses when the field of view limit (5 arc seconds) is reached, but the command remains active until zoomIn is called with false, or zoomOut with any value. While this command is active, other movement commands or mouse or keyboard operations will be countermanded by the still pending zoomIn command.
s | - true zoom, false stop |
|
slot |
With true, starts zooming out, with an unspecified ratio of degrees per second, either until zooming is stopped with a zoomIn call with false (or a zoomOut call).
Zooming pauses when the field of view limit (235 degrees) is reached, but the command remains active until zoomOut is called with false, or zoomIn with any value. While this command is active, other movement commands or mouse or keyboard operations will be countermanded by the still pending zoomOut command.
s | - true zoom, false stop |
|
slot |
Change the zoom level.
aimFov | The desired field of view in degrees. |
zoomDuration | The time that the operation should take to complete. [seconds] |