StelObserver.hpp   StelObserver.hpp 
skipping to change at line 45 skipping to change at line 45
class StelObserver : public QObject class StelObserver : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
//! Create a new StelObserver instance which is at a fixed Location //! Create a new StelObserver instance which is at a fixed Location
StelObserver(const StelLocation& loc); StelObserver(const StelLocation& loc);
~StelObserver(); ~StelObserver();
//! Update StelObserver info if needed. Default implementation does nothing. //! Update StelObserver info if needed. Default implementation does nothing.
virtual void update(double deltaTime) {;} virtual void update(double) {;}
//! Get the position of the home planet center in the heliocentric V SOP87 frame in AU //! Get the position of the home planet center in the heliocentric V SOP87 frame in AU
Vec3d getCenterVsop87Pos(void) const; Vec3d getCenterVsop87Pos(void) const;
//! Get the distance between observer and home planet center in AU //! Get the distance between observer and home planet center in AU
double getDistanceFromCenter(void) const; double getDistanceFromCenter(void) const;
Mat4d getRotAltAzToEquatorial(double jd) const; Mat4d getRotAltAzToEquatorial(double jd) const;
Mat4d getRotEquatorialToVsop87(void) const; Mat4d getRotEquatorialToVsop87(void) const;
virtual const QSharedPointer<Planet> getHomePlanet(void) const; virtual const QSharedPointer<Planet> getHomePlanet(void) const;
//! Get the informations on the current location //! Get the informations on the current location
virtual const StelLocation& getCurrentLocation() const {return curre ntLocation;} virtual const StelLocation& getCurrentLocation() const {return curre ntLocation;}
//! Get whether the life of this observer is over, and therefore tha t it should be changed to the next one //! Get whether the life of this observer is over, and therefore tha t it should be changed to the next one
//! provided by the getNextObserver() method //! provided by the getNextObserver() method
virtual bool isObserverLifeOver() const {return false;} virtual bool isObserverLifeOver() const {return false;}
//! Get whether the location is a moving one.
virtual bool isTraveling() const {return false;}
//! Get the next observer to use once the life of this one is over //! Get the next observer to use once the life of this one is over
virtual StelObserver* getNextObserver() const {return new StelObserv er(currentLocation);} virtual StelObserver* getNextObserver() const {return new StelObserv er(currentLocation);}
protected: protected:
StelLocation currentLocation; StelLocation currentLocation;
QSharedPointer<Planet> planet; QSharedPointer<Planet> planet;
}; };
//! @class SpaceShipObserver //! @class SpaceShipObserver
//! An observer which moves from from one position to another one and/or fr om one planet to another one //! An observer which moves from from one position to another one and/or fr om one planet to another one
class SpaceShipObserver : public StelObserver class SpaceShipObserver : public StelObserver
{ {
public: public:
SpaceShipObserver(const StelLocation& startLoc, const StelLocation& target, double transitSeconds=1.f); SpaceShipObserver(const StelLocation& startLoc, const StelLocation& target, double transitSeconds=1.f);
~SpaceShipObserver(); ~SpaceShipObserver();
//! Update StelObserver info if needed. Default implementation does nothing. //! Update StelObserver info if needed. Default implementation does nothing.
virtual void update(double deltaTime); virtual void update(double deltaTime);
virtual const QSharedPointer<Planet> getHomePlanet() const; virtual const QSharedPointer<Planet> getHomePlanet() const;
virtual bool isObserverLifeOver() const {return timeToGo <= 0.;} virtual bool isObserverLifeOver() const {return timeToGo <= 0.;}
virtual bool isTraveling() const {return !isObserverLifeOver();}
virtual StelObserver* getNextObserver() const {return new StelObserv er(moveTargetLocation);} virtual StelObserver* getNextObserver() const {return new StelObserv er(moveTargetLocation);}
private: private:
StelLocation moveStartLocation; StelLocation moveStartLocation;
StelLocation moveTargetLocation; StelLocation moveTargetLocation;
QSharedPointer<Planet> artificialPlanet; QSharedPointer<Planet> artificialPlanet;
double timeToGo; double timeToGo;
double transitSeconds; double transitSeconds;
}; };
 End of changes. 3 change blocks. 
1 lines changed or deleted 5 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/