VisioDevKit  v2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Friends Pages
VgMapModule::VgIMapModule Interface Referenceabstract

The VgIMapModule defines all the needed interfaces to interact with the map module. More...

Inheritance diagram for VgMapModule::VgIMapModule:
Inheritance graph

Public Member Functions

virtual ~VgIMapModule ()
 Destructor. More...
 
virtual void addListener (VgEngine::VgRefPtr< VgIPlaceListener >const &pListener)=0
 Adds a place listener. More...
 
virtual void removeListener (VgEngine::VgRefPtr< VgIPlaceListener >const &pListener)=0
 Removes a place listener. More...
 
virtual void setPlaceName (const std::string &pID, const std::string &pName)=0
 Sets a place name according to its ID. More...
 
virtual void setPlaceIcon (const std::string &pID, const VgPlaceIconDescriptor &pPlaceIconDescriptor)=0
 Sets a place icon according to its ID. More...
 
virtual bool getPlaceName (const std::string &pID, std::string &pPlaceName) const =0
 Gets a place name according to its ID. More...
 
virtual bool queryPlaceDescriptor (const std::string &pID, VgPlaceDescriptor &pPlaceDescriptor) const =0
 Queries a place descriptor. More...
 
virtual void queryAllPlaceIDs (std::vector< std::string > &pPlaceIDs) const =0
 Queries all place IDs. More...
 
virtual bool getLayerForPosition (const VgEngine::VgPosition &pPos, std::string &pLayerNameContainingPosition) const =0
 Finds the best fitting layer for a given position. More...
 
virtual bool getHeightRangeForLayer (const std::string &pLayerName, float &pHeightMin, float &pHeightMax) const =0
 Gets the height range (min and max) for a given layer. More...
 
virtual void setPlaceColor (const std::string &pID, const VgPlaceColorDescriptor &pColorDescriptor)=0
 Sets a place color according to its ID. More...
 
virtual void setPlaceColor (const std::vector< std::string > &pIDs, const VgPlaceColorDescriptor &pColorDescriptor)=0
 Sets a place color according to a list of place ID's. More...
 
virtual void resetPlaceColor (const std::string &pID)=0
 Resets the original color of a place. More...
 
virtual void resetPlaceColor (const std::vector< std::string > &pIDs)=0
 Resets the original color of a list of place. More...
 
- Public Member Functions inherited from VgApplication::VgIModule
virtual ~VgIModule ()
 Destructor. More...
 
virtual const std::string & getName () const =0
 Retrieves the module name. More...
 

Protected Member Functions

 VgIMapModule ()
 Constructor. More...
 
- Protected Member Functions inherited from VgApplication::VgIModule
 VgIModule ()
 Constructor. More...
 

Detailed Description

The VgIMapModule defines all the needed interfaces to interact with the map module.

Date
25/02/2010

Constructor & Destructor Documentation

VgMapModule::VgIMapModule::VgIMapModule ( )
inlineprotected

Constructor.

virtual VgMapModule::VgIMapModule::~VgIMapModule ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual void VgMapModule::VgIMapModule::addListener ( VgEngine::VgRefPtr< VgIPlaceListener >const &  pListener)
pure virtual

Adds a place listener.

Parameters
pListenerThe place listener to be added.
virtual bool VgMapModule::VgIMapModule::getHeightRangeForLayer ( const std::string &  pLayerName,
float &  pHeightMin,
float &  pHeightMax 
) const
pure virtual

Gets the height range (min and max) for a given layer.

Parameters
pLayerNameThe layer who's height range is of interest
[out]pHeightMinAn output parameter containing the minimum height (i.e. the floor) of pLayerName.
[out]pHeightMaxAn output parameter containing the maximum height (i.e. the ceiling) of pLayerName.
Returns
true if output range parameters have been correctly assigned, otherwise false.
Version
2.0
virtual bool VgMapModule::VgIMapModule::getLayerForPosition ( const VgEngine::VgPosition pPos,
std::string &  pLayerNameContainingPosition 
) const
pure virtual

Finds the best fitting layer for a given position.

Parameters
pPosthe position of interest
[out]pLayerNameContainingPositionA string which will be populated with the name of the best fitting layer.
Returns
true if a corresponding layer has been found, otherwise false.
Warning
This method ignores the VgEngine::VgPosition::mSRS member. It will use solely the mZOrAltitude member to determine the layer.

This means that the positions returned by picking in VgIPlaceListener subclasses will not be suitable to determine the layer in which the "click" occured, instead use the VgMapModule::VgPlaceDescriptor structure.

This behavior will change in the near future to take SRSs into account.

Version
2.0
virtual bool VgMapModule::VgIMapModule::getPlaceName ( const std::string &  pID,
std::string &  pPlaceName 
) const
pure virtual

Gets a place name according to its ID.

Parameters
pIDthe place ID.
[out]pPlaceNamethe place name.
Returns
false if pID does not exist.
virtual void VgMapModule::VgIMapModule::queryAllPlaceIDs ( std::vector< std::string > &  pPlaceIDs) const
pure virtual

Queries all place IDs.

Parameters
[out]pPlaceIDsA string vector which will be populated with place IDs for the current dataset.
virtual bool VgMapModule::VgIMapModule::queryPlaceDescriptor ( const std::string &  pID,
VgPlaceDescriptor pPlaceDescriptor 
) const
pure virtual

Queries a place descriptor.

Parameters
pIDthe place ID.
[out]pPlaceDescriptorthe place descriptor.
Returns
true if the place descriptor was found, otherwise false.
virtual void VgMapModule::VgIMapModule::removeListener ( VgEngine::VgRefPtr< VgIPlaceListener >const &  pListener)
pure virtual

Removes a place listener.

Parameters
pListenerThe place listener to be removed.
virtual void VgMapModule::VgIMapModule::resetPlaceColor ( const std::string &  pID)
pure virtual

Resets the original color of a place.

There are no effect if the place color has not been changed.

Parameters
pIDThe place ID.
virtual void VgMapModule::VgIMapModule::resetPlaceColor ( const std::vector< std::string > &  pIDs)
pure virtual

Resets the original color of a list of place.

There are no effect on places whose color has not been changed.

Parameters
pIDsA list of place IDs.
virtual void VgMapModule::VgIMapModule::setPlaceColor ( const std::string &  pID,
const VgPlaceColorDescriptor pColorDescriptor 
)
pure virtual

Sets a place color according to its ID.

Parameters
pIDThe place ID to color.
pColorDescriptorThe place color descriptor to be set.
Remarks
With non-extruded maps, only the VgPlaceColorDescriptor.mTopColor will be used.
It is advised to achieve the best performance to call setPlaceColor after loadConfiguration, but before loadDataset when updating many places.
It is advised to use this method when setting a single place with a unique color.
virtual void VgMapModule::VgIMapModule::setPlaceColor ( const std::vector< std::string > &  pIDs,
const VgPlaceColorDescriptor pColorDescriptor 
)
pure virtual

Sets a place color according to a list of place ID's.

Parameters
pIDsthe list of place IDs to color.
pColorDescriptorthe place color descriptor to be set.
Remarks
With non-extruded maps, only the VgPlaceColorDescriptor.mTopColor will be used.
It is advised to achieve the best performance to call setPlaceColor after loadConfiguration, but before loadDataset when updating many places.
It is advised to use this method when setting two or more places with the same color.
virtual void VgMapModule::VgIMapModule::setPlaceIcon ( const std::string &  pID,
const VgPlaceIconDescriptor pPlaceIconDescriptor 
)
pure virtual

Sets a place icon according to its ID.

The Texture it adds will be available on all datasets and will only be released if a different Texture is set for the same place ID or if a different configuration is loaded.

Parameters
[in]pIDthe place ID.
[in]pPlaceIconDescriptorThe place icon descriptor
Remarks
adding an icon changes the size of the place name, this function should not be used at the same time as setPlaceName for the same pID.
It is advised to achieve the best performance to call setPlaceIcon after loadConfiguration, but before loadDataset when updating many places.
virtual void VgMapModule::VgIMapModule::setPlaceName ( const std::string &  pID,
const std::string &  pName 
)
pure virtual

Sets a place name according to its ID.

Parameters
pIDthe place ID.
pNamethe place name to be set.
Remarks
It is advised to achieve the best performance to call setPlaceIcon after loadConfiguration, but before loadDataset when updating many places.

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