![]() |
MapLink Pro 11.1.2.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
This class is responsible for controlling a camera and its motion along a pre-defined path. It is a TimeServer client.
Note: The tick method is called in the context of the Timer thread not the main application thread (see the tick method documentation on this class).
Public Member Functions | |
TSLCameraManager (TSL3DDrawingSurface *surface, TSLTimeUInt32 updateRate=1, TSLTimeServer *server=0) | |
virtual | ~TSLCameraManager () |
void | prepare () |
TSLFlightPath & | flightPath () |
TSLFlightPath const & | flightPath () const |
void | lookAtPoint (double &latitude, double &longitude, double &altitude) const |
![]() | |
TSLTimeClient (TSLTimeUInt32 updateRate=1, TSLTimeServer *server=0) | |
virtual | ~TSLTimeClient () |
bool | attachToServer (TSLTimeServer *server) |
bool | update (TSLTimeInstant const &time, TSLTimeServer *timeServer) |
TSLTimeUInt32 | updateRate () const |
void | updateRate (TSLTimeUInt32 rate) |
Protected Member Functions | |
virtual bool | tick (TSLTimeServer *timeServer) |
Additional Inherited Members | |
![]() | |
TSLTimeUInt32 | m_updateRate |
TSLTimeInstant | m_time |
TSLTimeServer * | m_timeServer |
TSLCameraManager::TSLCameraManager | ( | TSL3DDrawingSurface * | surface, |
TSLTimeUInt32 | updateRate = 1, | ||
TSLTimeServer * | server = 0 ) |
Constructor.
Attaches the client to the supplied subject.
surface | A pointer to 3D drawing surface. |
updateRate | The tick interval at which updates will be captured e.g. if updateRate is set at 5, then only every 5th update will be processed. Default value is 1. |
server | A pointer to a Time Server. If this is not NULL, then the client is automatically attached to the time server. Default value is NULL. |
|
virtual |
Virtual destructor.
|
inline |
Returns a reference to the current flight path.
|
inline |
Returns a (const) reference to the current flight path.
|
inline |
Returns the point at which the camera is looking.
latitude | The latitude (degrees). |
longitude | The longitude (degrees). |
altitude | The altitude (metres). |
void TSLCameraManager::prepare | ( | ) |
This method resets the internal state of the manager prior to receiving the first tick event. It should be called prior to (re)starting the timer.
|
protectedvirtual |
This method is called by the update method after the time has been captured.
If this method is overridden then this method should be called as it updates the TSL3DCamera position.
This method is called in the context of the Timer thread not the main drawing thread. Application locking may be required to ensure that a draw does not occur while the camera is updated.
timeServer | A pointer to the Time Server. |
Return true if the client actually changes as a result of this event, false otherwise.
Implements TSLTimeClient.