VisioDevKit-Sample  v2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Pages
VgMyPositionTracker Class Reference

Receives location provider events and when position tracking is enabled, will animate the camera to that location. More...

Inheritance diagram for VgMyPositionTracker:
Inheritance graph

Public Member Functions

 VgMyPositionTracker (VgApplication::VgIApplication *pVgApplication, VgMyLayerAndCameraHandler *pLayerAndCameraHandler)
 Constructor. More...
 
 ~VgMyPositionTracker ()
 
void enable ()
 Enable the Position Tracker. More...
 
void disable ()
 Disable the Position Tracker. More...
 
bool isEnabled ()
 
void addPositionTrackerListener (VgMyPositionTrackerListener *pPositionTrackerListener)
 Add a listener to this position tracker. More...
 
void removePositionTrackerListener (VgMyPositionTrackerListener *pPositionTrackerListener)
 Remove a listener to this position tracker. More...
 
void notifyPositionDidChange (const std::string &pProvider, const VgEngine::VgPosition &pPosition)
 Called when the location has changed. More...
 
void notifyFloorDidChange (const std::string &pProvider, const std::string &pFloor)
 Called when the floor has changed. More...
 
void notifyAccuracyDidChange (const std::string &pProvider, double pAccuracy)
 Called when the accuracy has changed. More...
 
void notifyContextDidChange (const std::string &pProvider, int pContext)
 Called when the context has changed. More...
 
void notifyHeadingDidChange (const std::string &pProvider, double pHeading)
 Called when the heading has changed. More...
 
void notifyStatusDidChange (const std::string &pProvider, int pStatus)
 Called when the status has changed. More...
 
void notifyLocationProviderEnabled (const std::string &pProvider)
 Called when the provider is enabled. More...
 
void notifyLocationProviderDisabled (const std::string &pProvider)
 Called when the provider is disabled. More...
 

Protected Attributes

VgApplication::VgIApplication * mVgApplication
 
VgMyLayerAndCameraHandlermLayerAndCameraHandler
 
VgEngine::VgPosition mCurrentPosition
 
std::string mCurrentLayer
 
bool mIsEnabled
 
VgMyPositionTrackerListenermPositionTrackerListener
 

Additional Inherited Members

- Protected Member Functions inherited from VgMyLocationListener
virtual ~VgMyLocationListener ()
 

Detailed Description

Receives location provider events and when position tracking is enabled, will animate the camera to that location.

Must be registered with VgMyLocationManager before it will receive location notification.

Constructor & Destructor Documentation

VgMyPositionTracker::VgMyPositionTracker ( VgApplication::VgIApplication *  pVgApplication,
VgMyLayerAndCameraHandler pLayerAndCameraHandler 
)

Constructor.

Parameters
pVgApplicationVgIApplication to use. Can't be NULL
pLayerAndCameraHandlerThe interface which allows this class to manipulate the camera.
VgMyPositionTracker::~VgMyPositionTracker ( )

Member Function Documentation

void VgMyPositionTracker::addPositionTrackerListener ( VgMyPositionTrackerListener pPositionTrackerListener)

Add a listener to this position tracker.

Parameters
pPositionTrackerListenerThe position tracker listener to add. Currently, only one listener supported. If there is already a position tracking listener, this will override an existing one.
void VgMyPositionTracker::disable ( )

Disable the Position Tracker.

void VgMyPositionTracker::enable ( )

Enable the Position Tracker.

bool VgMyPositionTracker::isEnabled ( )
Returns
The current enabled/disabled state of the position tracker.
void VgMyPositionTracker::notifyAccuracyDidChange ( const std::string &  pProvider,
double  pAccuracy 
)
virtual

Called when the accuracy has changed.

Parameters
pProviderThe location provider responsible for sending the notification.
pAccuracyThe new accuracy

Implements VgMyLocationListener.

void VgMyPositionTracker::notifyContextDidChange ( const std::string &  pProvider,
int  pContext 
)
virtual

Called when the context has changed.

Parameters
pProviderThe location provider responsible for sending the notification.
pContextThe new context

Implements VgMyLocationListener.

void VgMyPositionTracker::notifyFloorDidChange ( const std::string &  pProvider,
const std::string &  pFloor 
)
virtual

Called when the floor has changed.

Parameters
pProviderThe location provider responsible for sending the notification.
pFloorThe new floor

Implements VgMyLocationListener.

void VgMyPositionTracker::notifyHeadingDidChange ( const std::string &  pProvider,
double  pHeading 
)
virtual

Called when the heading has changed.

Heading is the horizontal direction of travel of this device, and is not related to the device orientation.

Parameters
pProviderThe location provider responsible for sending the notification.
pHeadingThe new heading. The valid range for the heading is [0.0, 360.0]. Where 0.0 is North, and increasing values starts towards the East.

Implements VgMyLocationListener.

void VgMyPositionTracker::notifyLocationProviderDisabled ( const std::string &  pProvider)
virtual

Called when the provider is disabled.

Parameters
pProviderThe location provider responsible for sending the notification.

Implements VgMyLocationListener.

void VgMyPositionTracker::notifyLocationProviderEnabled ( const std::string &  pProvider)
virtual

Called when the provider is enabled.

Parameters
pProviderThe location provider responsible for sending the notification.

Implements VgMyLocationListener.

void VgMyPositionTracker::notifyPositionDidChange ( const std::string &  pProvider,
const VgEngine::VgPosition &  pPosition 
)
virtual

Called when the location has changed.

Parameters
pProviderThe location provider responsible for sending the notification
pPositionThe new position

Implements VgMyLocationListener.

void VgMyPositionTracker::notifyStatusDidChange ( const std::string &  pProvider,
int  pStatus 
)
virtual

Called when the status has changed.

Parameters
pProviderThe location provider responsible for sending the notification.
pStatusThe new status. See for available values.

Implements VgMyLocationListener.

void VgMyPositionTracker::removePositionTrackerListener ( VgMyPositionTrackerListener pPositionTrackerListener)

Remove a listener to this position tracker.

Parameters
pPositionTrackerListenerThe position tracker listener to remove.

Member Data Documentation

std::string VgMyPositionTracker::mCurrentLayer
protected
VgEngine::VgPosition VgMyPositionTracker::mCurrentPosition
protected
bool VgMyPositionTracker::mIsEnabled
protected
VgMyLayerAndCameraHandler* VgMyPositionTracker::mLayerAndCameraHandler
protected
VgMyPositionTrackerListener* VgMyPositionTracker::mPositionTrackerListener
protected
VgApplication::VgIApplication* VgMyPositionTracker::mVgApplication
protected

The documentation for this class was generated from the following file:
VisioDevKit 2.0, Visioglobe® 2013