VisioMove-Sample  2.1.3
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Pages
VgMyAvatarDisplay Class Reference

Displays an avatar for the user that will display its position on the map. More...

Inheritance diagram for VgMyAvatarDisplay:
Inheritance graph

Public Member Functions

 VgMyAvatarDisplay (VgApplication::VgIApplication *pVgApplication, VgMyTextureLoader *pTextureLoader, std::string &pAvatarImageName)
 Constructor. More...
 
 ~VgMyAvatarDisplay ()
 
void createAvatar ()
 Create the basic avatar. 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...
 
void show ()
 
void hide ()
 
bool isVisible ()
 

Protected Attributes

VgApplication::VgIApplication * mVgApplication
 
VgEngine::VgRefPtr
< Vg3DModule::VgPoint > 
mAvatarPoint
 
VgMyTextureLoadermTextureLoader
 
VgEngine::VgPosition mPosition
 
std::string mCurrentAvatarLayerName
 
std::string mGeometryContext
 

Additional Inherited Members

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

Detailed Description

Displays an avatar for the user that will display its position on the map.

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

IMPLEMENTATION TIPS: You can customize its texture and its animation.

Constructor & Destructor Documentation

VgMyAvatarDisplay::VgMyAvatarDisplay ( VgApplication::VgIApplication *  pVgApplication,
VgMyTextureLoader pTextureLoader,
std::string &  pAvatarImageName 
)

Constructor.

Parameters
pVgApplicationVgIApplication to use. Can't be NULL
pTextureLoaderVgMyTextureLoader to use. Can't be NULL.
pAvatarImageNameThe name of the image to be used to represent the avatar. The image should be an asset within your project and it will suffice to just pass the name (path not required) which also includes the filename extension.
Note
You may change its texture within this constructor.
VgMyAvatarDisplay::~VgMyAvatarDisplay ( )

Member Function Documentation

void VgMyAvatarDisplay::createAvatar ( )

Create the basic avatar.

void VgMyAvatarDisplay::hide ( )
bool VgMyAvatarDisplay::isVisible ( )
void VgMyAvatarDisplay::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 VgMyAvatarDisplay::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 VgMyAvatarDisplay::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 VgMyAvatarDisplay::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 VgMyAvatarDisplay::notifyLocationProviderDisabled ( const std::string &  pProvider)
virtual

Called when the provider is disabled.

Parameters
pProviderThe location provider responsible for sending the notification.

Implements VgMyLocationListener.

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

Called when the provider is enabled.

Parameters
pProviderThe location provider responsible for sending the notification.

Implements VgMyLocationListener.

void VgMyAvatarDisplay::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 VgMyAvatarDisplay::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 VgMyAvatarDisplay::show ( )

Member Data Documentation

VgEngine::VgRefPtr< Vg3DModule::VgPoint > VgMyAvatarDisplay::mAvatarPoint
protected
std::string VgMyAvatarDisplay::mCurrentAvatarLayerName
protected
std::string VgMyAvatarDisplay::mGeometryContext
protected
VgEngine::VgPosition VgMyAvatarDisplay::mPosition
protected
VgMyTextureLoader* VgMyAvatarDisplay::mTextureLoader
protected
VgApplication::VgIApplication* VgMyAvatarDisplay::mVgApplication
protected

The documentation for this class was generated from the following file:
VisioMove 2.1.3, Visioglobe® 2015