MapLink Pro 11.1.2.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Loading...
Searching...
No Matches
TSLCameraManager Class Reference
Inheritance diagram for TSLCameraManager:

Detailed Description

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 ()
 
TSLFlightPathflightPath ()
 
TSLFlightPath const & flightPath () const
 
void lookAtPoint (double &latitude, double &longitude, double &altitude) const
 
- Public Member Functions inherited from TSLTimeClient
 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

- Protected Attributes inherited from TSLTimeClient
TSLTimeUInt32 m_updateRate
 
TSLTimeInstant m_time
 
TSLTimeServerm_timeServer
 

Constructor & Destructor Documentation

◆ TSLCameraManager()

TSLCameraManager::TSLCameraManager ( TSL3DDrawingSurface * surface,
TSLTimeUInt32 updateRate = 1,
TSLTimeServer * server = 0 )

Constructor.

Attaches the client to the supplied subject.

Parameters
surfaceA pointer to 3D drawing surface.
updateRateThe 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.
serverA pointer to a Time Server. If this is not NULL, then the client is automatically attached to the time server. Default value is NULL.

◆ ~TSLCameraManager()

virtual TSLCameraManager::~TSLCameraManager ( )
virtual

Virtual destructor.

Member Function Documentation

◆ flightPath() [1/2]

TSLFlightPath & TSLCameraManager::flightPath ( )
inline

Returns a reference to the current flight path.

◆ flightPath() [2/2]

TSLFlightPath const & TSLCameraManager::flightPath ( ) const
inline

Returns a (const) reference to the current flight path.

◆ lookAtPoint()

void TSLCameraManager::lookAtPoint ( double & latitude,
double & longitude,
double & altitude ) const
inline

Returns the point at which the camera is looking.

Parameters
latitudeThe latitude (degrees).
longitudeThe longitude (degrees).
altitudeThe altitude (metres).

◆ prepare()

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.

◆ tick()

virtual bool TSLCameraManager::tick ( TSLTimeServer * timeServer)
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.

Parameters
timeServerA pointer to the Time Server.

Return true if the client actually changes as a result of this event, false otherwise.

Implements TSLTimeClient.