StelMovementMgr.hpp   StelMovementMgr.hpp 
/* /*
* Stellarium * Stellarium
* Copyright (C) 2007 Fabien Chereau * Copyright (C) 2007 Fabien Chereau
* Copyright (C) 2015 Georg Zotti (offset view adaptations)
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
skipping to change at line 41 skipping to change at line 42
Q_OBJECT Q_OBJECT
Q_PROPERTY(bool equatorialMount Q_PROPERTY(bool equatorialMount
READ getEquatorialMount READ getEquatorialMount
WRITE setEquatorialMount) WRITE setEquatorialMount)
Q_PROPERTY(bool tracking Q_PROPERTY(bool tracking
READ getFlagTracking READ getFlagTracking
WRITE setFlagTracking) WRITE setFlagTracking)
public: public:
//! Possible mount modes defining the reference frame in which head movements occur. //! Possible mount modes defining the reference frame in which head movements occur.
//! MountGalactic is currently only available via scripting API: cor
e.clear("galactic")
// TODO: add others like MountEcliptical
enum MountMode { MountAltAzimuthal, MountEquinoxEquatorial, MountGal actic}; enum MountMode { MountAltAzimuthal, MountEquinoxEquatorial, MountGal actic};
StelMovementMgr(StelCore* core); StelMovementMgr(StelCore* core);
virtual ~StelMovementMgr(); virtual ~StelMovementMgr();
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods defined in the StelModule class // Methods defined in the StelModule class
//! Initializes the object based on the application settings //! Initializes the object based on the application settings
//! Includes: //! Includes:
//! - Enabling/disabling the movement keys //! - Enabling/disabling the movement keys
skipping to change at line 117 skipping to change at line 120
//! Set whether sky position is to be locked. //! Set whether sky position is to be locked.
void setFlagLockEquPos(bool b); void setFlagLockEquPos(bool b);
//! Get whether sky position is locked. //! Get whether sky position is locked.
bool getFlagLockEquPos(void) const {return flagLockEquPos;} bool getFlagLockEquPos(void) const {return flagLockEquPos;}
//! Move view in alt/az (or equatorial if in that mode) coordinates. //! Move view in alt/az (or equatorial if in that mode) coordinates.
//! Changes to viewing direction are instantaneous. //! Changes to viewing direction are instantaneous.
//! @param deltaAz change in azimuth angle in radians //! @param deltaAz change in azimuth angle in radians
//! @param deltaAlt change in altitude angle in radians //! @param deltaAlt change in altitude angle in radians
void panView(double deltaAz, double deltaAlt); void panView(const double deltaAz, const double deltaAlt);
//! Set automove duration in seconds //! Set automove duration in seconds
//! @param f the number of seconds it takes for an auto-move operati on to complete. //! @param f the number of seconds it takes for an auto-move operati on to complete.
void setAutoMoveDuration(float f) {autoMoveDuration = f;} void setAutoMoveDuration(float f) {autoMoveDuration = f;}
//! Get automove duration in seconds //! Get automove duration in seconds
//! @return the number of seconds it takes for an auto-move operatio n to complete. //! @return the number of seconds it takes for an auto-move operatio n to complete.
float getAutoMoveDuration(void) const {return autoMoveDuration;} float getAutoMoveDuration(void) const {return autoMoveDuration;}
//! Set whether auto zoom out will reset the viewing direction to th e inital value //! Set whether auto zoom out will reset the viewing direction to th e inital value
void setFlagAutoZoomOutResetsDirection(bool b) {flagAutoZoomOutReset sDirection = b;} void setFlagAutoZoomOutResetsDirection(bool b) {flagAutoZoomOutReset sDirection = b;}
skipping to change at line 160 skipping to change at line 163
//! Move the view to a specified J2000 position. //! Move the view to a specified J2000 position.
//! @param aim The position to move to expressed as a vector. //! @param aim The position to move to expressed as a vector.
//! @param moveDuration The time it takes for the move to complete. //! @param moveDuration The time it takes for the move to complete.
//! @param zooming ??? //! @param zooming ???
void moveToJ2000(const Vec3d& aim, float moveDuration = 1., int zoom ing = 0); void moveToJ2000(const Vec3d& aim, float moveDuration = 1., int zoom ing = 0);
void moveToObject(const StelObjectP& target, float moveDuration = 1. , int zooming = 0); void moveToObject(const StelObjectP& target, float moveDuration = 1. , int zooming = 0);
//! Change the zoom level. //! Change the zoom level.
//! @param aimFov The desired field of view in degrees. //! @param aimFov The desired field of view in degrees.
//! @param moveDuration The time that the operation should take to c omplete. //! @param moveDuration The time that the operation should take to c omplete. [seconds]
void zoomTo(double aimFov, float moveDuration = 1.); void zoomTo(double aimFov, float moveDuration = 1.);
//! Get the current Field Of View in degrees //! Get the current Field Of View in degrees
double getCurrentFov() const {return currentFov;} double getCurrentFov() const {return currentFov;}
//! Return the initial default FOV in degree. //! Return the initial default FOV in degree.
double getInitFov() const {return initFov;} double getInitFov() const {return initFov;}
//! Set the initial Field Of View in degree. //! Set the initial Field Of View in degree.
void setInitFov(double fov) {initFov=fov;} void setInitFov(double fov) {initFov=fov;}
//! Return the inital viewing direction in altazimuthal coordinates //! Return the inital viewing direction in altazimuthal coordinates
skipping to change at line 224 skipping to change at line 227
//! Return the initial value of intensity of art of constellations. //! Return the initial value of intensity of art of constellations.
double getInitConstellationIntensity() const {return initConstellati onIntensity;} double getInitConstellationIntensity() const {return initConstellati onIntensity;}
//! Set the initial value of intensity of art of constellations. //! Set the initial value of intensity of art of constellations.
void setInitConstellationIntensity(double v) {initConstellationInten sity=v;} void setInitConstellationIntensity(double v) {initConstellationInten sity=v;}
private: private:
Vec3d j2000ToMountFrame(const Vec3d& v) const; Vec3d j2000ToMountFrame(const Vec3d& v) const;
Vec3d mountFrameToJ2000(const Vec3d& v) const; Vec3d mountFrameToJ2000(const Vec3d& v) const;
double currentFov; // The current FOV in degree double currentFov; // The current FOV in degrees
double initFov; // The FOV at startup double initFov; // The FOV at startup
double minFov; // Minimum FOV in degree double minFov; // Minimum FOV in degrees
double maxFov; // Maximum FOV in degree double maxFov; // Maximum FOV in degrees
double initConstellationIntensity; // The initial constellation ar t intensity (level at startup) double initConstellationIntensity; // The initial constellation ar t intensity (level at startup)
void setFov(double f) void setFov(double f)
{ {
currentFov = f; currentFov = f;
if (f>maxFov) if (f>maxFov)
currentFov = maxFov; currentFov = maxFov;
if (f<minFov) if (f<minFov)
currentFov = minFov; currentFov = minFov;
skipping to change at line 290 skipping to change at line 293
StelObjectP targetObject; StelObjectP targetObject;
}; };
AutoMove move; // Current auto movement AutoMove move; // Current auto movement
bool flagAutoMove; // Define if automove is on or off bool flagAutoMove; // Define if automove is on or off
int zoomingMode; // 0 : undefined, 1 zooming, -1 unzooming int zoomingMode; // 0 : undefined, 1 zooming, -1 unzooming
double deltaFov,deltaAlt,deltaAz; // View movement double deltaFov,deltaAlt,deltaAz; // View movement
bool flagManualZoom; // Define whether auto zoom can go further bool flagManualZoom; // Define whether auto zoom can go further
float autoMoveDuration; // Duration of movement for the auto move to a selected objectin seconds float autoMoveDuration; // Duration of movement for the auto move to a selected object in seconds
// Mouse control options // Mouse control options
bool isDragging, hasDragged; bool isDragging, hasDragged;
int previousX, previousY; int previousX, previousY;
// Contains the last N real time / JD times pairs associated with th e last N mouse move events // Contains the last N real time / JD times pairs associated with th e last N mouse move events
struct DragHistoryEntry struct DragHistoryEntry
{ {
double runTime; double runTime;
double jd; double jd;
skipping to change at line 314 skipping to change at line 317
QList<DragHistoryEntry> timeDragHistory; QList<DragHistoryEntry> timeDragHistory;
void addTimeDragPoint(int x, int y); void addTimeDragPoint(int x, int y);
float beforeTimeDragTimeRate; float beforeTimeDragTimeRate;
// Time mouse control // Time mouse control
bool dragTimeMode; bool dragTimeMode;
//! @internal //! @internal
//! Store data for auto-zoom. //! Store data for auto-zoom.
// Components:
// startFov: field of view at start
// aimFov: intended field of view at end of zoom move
// speed: rate of change. UNITS?
// coef: set to 0 at begin of zoom, will increase to 1 during autozo
om motion.
struct AutoZoom struct AutoZoom
{ {
double start; double startFov;
double aim; double aimFov;
float speed; float speed;
float coef; float coef;
}; };
// Automove // Automove
AutoZoom zoomMove; // Current auto movement AutoZoom zoomMove; // Current auto movement
bool flagAutoZoom; // Define if autozoom is on or off bool flagAutoZoom; // Define if autozoom is on or off
bool flagAutoZoomOutResetsDirection; bool flagAutoZoomOutResetsDirection;
// defines if view corrects for horizon, or uses equatorial coordina tes // defines if view corrects for horizon, or uses equatorial coordina tes
 End of changes. 9 change blocks. 
8 lines changed or deleted 18 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/