StelMovementMgr.hpp   StelMovementMgr.hpp 
skipping to change at line 54 skipping to change at line 54
//! Includes: //! Includes:
//! - Enabling/disabling the movement keys //! - Enabling/disabling the movement keys
//! - Enabling/disabling the zoom keys //! - Enabling/disabling the zoom keys
//! - Enabling/disabling the mouse zoom //! - Enabling/disabling the mouse zoom
//! - Enabling/disabling the mouse movement //! - Enabling/disabling the mouse movement
//! - Sets the zoom and movement speeds //! - Sets the zoom and movement speeds
//! - Sets the auto-zoom duration and mode. //! - Sets the auto-zoom duration and mode.
virtual void init(); virtual void init();
//! Update time-dependent things (does nothing). //! Update time-dependent things (does nothing).
virtual void update(double deltaTime) {;} virtual void update(double) {;}
//! Implement required draw function. Does nothing. //! Implement required draw function. Does nothing.
virtual void draw(StelCore* acore) {;} virtual void draw(StelCore*) {;}
//! Handle keyboard events. //! Handle keyboard events.
virtual void handleKeys(QKeyEvent* event); virtual void handleKeys(QKeyEvent* event);
//! Handle mouse movement events. //! Handle mouse movement events.
virtual bool handleMouseMoves(int x, int y, Qt::MouseButtons b); virtual bool handleMouseMoves(int x, int y, Qt::MouseButtons b);
//! Handle mouse wheel events. //! Handle mouse wheel events.
virtual void handleMouseWheel(class QWheelEvent* event); virtual void handleMouseWheel(class QWheelEvent* event);
//! Handle mouse click events. //! Handle mouse click events.
virtual void handleMouseClicks(class QMouseEvent* event); virtual void handleMouseClicks(class QMouseEvent* event);
//! Called then the selected object changes. //! Called then the selected object changes.
virtual void selectedObjectChangeCallBack(StelModuleSelectAction act ion=StelModule::ReplaceSelection); virtual void selectedObjectChangeCallBack(StelModuleSelectAction act ion=StelModule::ReplaceSelection);
skipping to change at line 83 skipping to change at line 83
// These are hopefully temporary. // These are hopefully temporary.
bool getHasDragged() const {return hasDragged;} bool getHasDragged() const {return hasDragged;}
//! Get the zoom speed //! Get the zoom speed
// TODO: what are the units? // TODO: what are the units?
double getZoomSpeed() {return keyZoomSpeed;} double getZoomSpeed() {return keyZoomSpeed;}
//! Return the current up view vector. //! Return the current up view vector.
Vec3d getViewUpVectorJ2000() const; Vec3d getViewUpVectorJ2000() const;
void setViewUpVectorJ2000(const Vec3d& up);
void setMovementSpeedFactor(float s) {movementsSpeedFactor=s;} void setMovementSpeedFactor(float s) {movementsSpeedFactor=s;}
float getMovementSpeedFactor() const {return movementsSpeedFactor;} float getMovementSpeedFactor() const {return movementsSpeedFactor;}
void setDragTriggerDistance(float d) {dragTriggerDistance=d;}
public slots: public slots:
//! Toggle current mount mode between equatorial and altazimuthal //! Toggle current mount mode between equatorial and altazimuthal
void toggleMountMode() {if (getMountMode()==MountAltAzimuthal) setMo untMode(MountEquinoxEquatorial); else setMountMode(MountAltAzimuthal);} void toggleMountMode() {if (getMountMode()==MountAltAzimuthal) setMo untMode(MountEquinoxEquatorial); else setMountMode(MountAltAzimuthal);}
//! Define whether we should use equatorial mount or altazimuthal //! Define whether we should use equatorial mount or altazimuthal
void setEquatorialMount(bool b) {setMountMode(b ? MountEquinoxEquato rial : MountAltAzimuthal);} void setEquatorialMount(bool b) {setMountMode(b ? MountEquinoxEquato rial : MountAltAzimuthal);}
//! Set object tracking on/off and go to selected object //! Set object tracking on/off and go to selected object
void setFlagTracking(bool b=true); void setFlagTracking(bool b=true);
//! Get current object tracking status. //! Get current object tracking status.
bool getFlagTracking(void) const {return flagTracking;} bool getFlagTracking(void) const {return flagTracking;}
skipping to change at line 197 skipping to change at line 200
void turnDown(bool); void turnDown(bool);
void moveSlow(bool b) {flagMoveSlow=b;} void moveSlow(bool b) {flagMoveSlow=b;}
void zoomIn(bool); void zoomIn(bool);
void zoomOut(bool); void zoomOut(bool);
//! Set current mount type defining the reference frame in which hea d movements occur. //! Set current mount type defining the reference frame in which hea d movements occur.
void setMountMode(MountMode m); void setMountMode(MountMode m);
//! Get current mount type defining the reference frame in which hea d movements occur. //! Get current mount type defining the reference frame in which hea d movements occur.
MountMode getMountMode(void) const {return mountMode;} MountMode getMountMode(void) const {return mountMode;}
void setDragTimeMode(bool b) {dragTimeMode=b;}
bool getDragTimeMode() const {return dragTimeMode;}
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 degree
double initFov; // The FOV at startup double initFov; // The FOV at startup
double minFov; // Minimum FOV in degree double minFov; // Minimum FOV in degree
double maxFov; // Maximum FOV in degree double maxFov; // Maximum FOV in degree
void setFov(double f) void setFov(double f)
skipping to change at line 269 skipping to change at line 275
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 objectin 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
QList<QPair<double, double> > timeDragHistory;
void addTimeDragPoint();
float beforeTimeDragTimeRate;
// Time mouse control
bool dragTimeMode;
//! @internal //! @internal
//! Store data for auto-zoom. //! Store data for auto-zoom.
struct AutoZoom struct AutoZoom
{ {
double start; double start;
double aim; double aim;
float speed; float speed;
float coef; float coef;
}; };
skipping to change at line 293 skipping to change at line 307
// defines if view corrects for horizon, or uses equatorial coordina tes // defines if view corrects for horizon, or uses equatorial coordina tes
MountMode mountMode; MountMode mountMode;
Vec3d initViewPos; // Default viewing direction Vec3d initViewPos; // Default viewing direction
// Viewing direction in equatorial J2000 coordinates // Viewing direction in equatorial J2000 coordinates
Vec3d viewDirectionJ2000; Vec3d viewDirectionJ2000;
// Viewing direction in the mount reference frame. // Viewing direction in the mount reference frame.
Vec3d viewDirectionMountFrame; Vec3d viewDirectionMountFrame;
Vec3d upVectorMountFrame;
float dragTriggerDistance;
}; };
#endif // _STELMOVEMENTMGR_HPP_ #endif // _STELMOVEMENTMGR_HPP_
 End of changes. 7 change blocks. 
2 lines changed or deleted 21 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/