VisioDevKit-Sample  v2.0
 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, bool pDoesFollowRoute)
 Constructor. More...
 
virtual ~VgMyAvatarDisplay ()
 
void updateWithPosition (VgEngine::VgConstRefPtr< VgNavigationModule::VgINavigation > const &pNavigation, const VgEngine::VgPosition &pPosition)
 A notification containing the latest position associated with the navigation object. More...
 
void clear ()
 Clears the object. More...
 
void show ()
 Declaration from interface : VgMyDisplayable. More...
 
void hide ()
 Hides this Object. More...
 
bool isVisible ()
 

Protected Attributes

VgApplication::VgIApplication * mVgApplication
 
VgEngine::VgRefPtr
< Vg3DModule::VgPoint > 
mAvatarPoint
 
VgMyTextureLoadermTextureLoader
 
VgEngine::VgPosition mPosition
 
std::string mLastAvatarLayerName
 
bool mDoesFollowRoute
 
bool mIsAvatarVisible
 

Detailed Description

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

If an instance is registred into the VgMyBasicApplicationController instance, its position will be automatically updated once a VgMyLocationProdiver subclass will inject a new position through VgMyBasicApplicationController::updatePosition

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

Constructor & Destructor Documentation

VgMyAvatarDisplay::VgMyAvatarDisplay ( VgApplication::VgIApplication *  pVgApplication,
VgMyTextureLoader pTextureLoader,
bool  pDoesFollowRoute 
)

Constructor.

Parameters
pVgApplicationVgIApplication to use. Can't be NULL
pTextureLoaderVgMyTextureLoader to use. Can't be NULL.
pDoesFollowRouteUse TRUE to display an avatar projected on the closest point of the route. Use FALSE to display an avatar with the exact position.
Note
You can change its texture in this method.
virtual VgMyAvatarDisplay::~VgMyAvatarDisplay ( )
virtual

Member Function Documentation

void VgMyAvatarDisplay::clear ( )
virtual

Clears the object.

Implements VgMyNavigationPositionDisplay.

void VgMyAvatarDisplay::hide ( )
virtual

Hides this Object.

No effect if it is already hidden.

Implements VgMyNavigationPositionDisplay.

bool VgMyAvatarDisplay::isVisible ( )
virtual
Returns
TRUE if this Object is visible (i.e. shown). FALSE otherwise.

Implements VgMyNavigationPositionDisplay.

void VgMyAvatarDisplay::show ( )
virtual

Declaration from interface : VgMyDisplayable.

Implements VgMyNavigationPositionDisplay.

void VgMyAvatarDisplay::updateWithPosition ( VgEngine::VgConstRefPtr< VgNavigationModule::VgINavigation > const &  pNavigation,
const VgEngine::VgPosition &  pPosition 
)
virtual

A notification containing the latest position associated with the navigation object.

Parameters
pNavigationThe navigation object.
pPositionThe new position.

Implements VgMyNavigationPositionDisplay.

Member Data Documentation

VgEngine::VgRefPtr< Vg3DModule::VgPoint > VgMyAvatarDisplay::mAvatarPoint
protected
bool VgMyAvatarDisplay::mDoesFollowRoute
protected
bool VgMyAvatarDisplay::mIsAvatarVisible
protected
std::string VgMyAvatarDisplay::mLastAvatarLayerName
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:
VisioDevKit 2.0, Visioglobe® 2013