StelObserver.hpp   StelObserver.hpp 
skipping to change at line 82 skipping to change at line 82
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
{ {
Q_OBJECT
public: public:
SpaceShipObserver(const StelLocation& startLoc, const StelLocation& target, double transitSeconds=1.f); SpaceShipObserver(const StelLocation& startLoc, const StelLocation& target, double transitSeconds=1.f, double timeToGo=-1.0);
~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 bool isTraveling() const {return !isObserverLifeOver();}
virtual StelObserver* getNextObserver() const {return new StelObserv er(moveTargetLocation);} virtual StelObserver* getNextObserver() const {return new StelObserv er(moveTargetLocation);}
//! Returns the target location
StelLocation getTargetLocation() const { return moveTargetLocation;
}
//! Returns the remaining movement time
double getRemainingTime() const { return timeToGo; }
//! Returns the total movement time
double getTransitTime() const { return transitSeconds; }
private: private:
StelLocation moveStartLocation; StelLocation moveStartLocation;
StelLocation moveTargetLocation; StelLocation moveTargetLocation;
QSharedPointer<Planet> artificialPlanet; QSharedPointer<Planet> artificialPlanet;
double timeToGo; double timeToGo;
double transitSeconds; double transitSeconds;
}; };
#endif // _STELOBSERVER_HPP_ #endif // _STELOBSERVER_HPP_
 End of changes. 3 change blocks. 
1 lines changed or deleted 10 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/