VisioMove SDK (iOS)  2.1.22
VgEngine::VgIEngine Class Referenceabstract

Public Member Functions

virtual ~VgIEngine ()
 
virtual void addPostDrawCallback (VgEngine::VgRefPtr< VgEngine::VgIEnginePostDrawCallback >const &pCallback)=0
 
virtual void removePostDrawCallback (VgEngine::VgRefPtr< VgEngine::VgIEnginePostDrawCallback >const &pCallback)=0
 
virtual const std::vector< VgEngine::VgRefPtr< VgEngine::VgIEnginePostDrawCallback > > & getPostDrawCallbacks () const =0
 
virtual VgIDatabaseeditDatabase ()=0
 
virtual VgICameraeditCamera ()=0
 
virtual VgILicenseManagereditLicenseManager ()=0
 
virtual VgITextureManagereditTextureManager ()=0
 
virtual VgIAnimationManagereditAnimationManager ()=0
 
virtual VgIResourceManagereditResourceManager ()=0
 
virtual VgLayerManagereditLayerManager ()=0
 
virtual VgInstanceFactoryeditInstanceFactory ()=0
 
virtual VgFontManagereditFontManager ()=0
 
virtual const VgPositionToolboxgetPositionToolbox ()=0
 
virtual VgErrorCode getLastError () const =0
 
virtual const std::string & getErrorString (VgErrorCode pErrorCode) const =0
 
virtual std::list< VgRefPtr< VgSpatial > > execute (const VgQuery &pQuery)=0
 
virtual void resetGraphicResources (bool pIsContextLost)=0
 
virtual void reloadShaders ()=0
 
virtual VgConstRefPtr< VgLightgetLight (UInt pLightNum) const =0
 
virtual VgRefPtr< VgLighteditLight (UInt pLightNum)=0
 
virtual UInt getNumLights () const =0
 
virtual void replaceNamedTexture (const std::string &pResourceName, VgEngine::VgRefPtr< VgEngine::VgITexture > &pTexture)=0
 
virtual void setClearColor (const VgEngine::VgColor &pClearColor)=0
 
virtual bool isLoaded (VgEngine::UInt &pGraphicsQueue, VgEngine::UInt &pLoadQueueSize, VgEngine::UInt &pLoadedQueueSize, VgEngine::UInt &pActiveThreads)=0
 

Protected Member Functions

 VgIEngine ()
 

Detailed Description

This interface provides an entry-point to retrieve objects from the Visioglobe engine.

Constructor & Destructor Documentation

VgEngine::VgIEngine::VgIEngine ( )
inlineprotected

Constructor.

virtual VgEngine::VgIEngine::~VgIEngine ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual void VgEngine::VgIEngine::addPostDrawCallback ( VgEngine::VgRefPtr< VgEngine::VgIEnginePostDrawCallback >const &  pCallback)
pure virtual

This method is used to add a VgIEnginePostDrawCallback to the engine.

Note
Note that adding too many post draw callbacks (or having a post draw callback that takes time to execute) can lead to bad performance.
Parameters
pCallbackthe post draw callback.
virtual VgIAnimationManager* VgEngine::VgIEngine::editAnimationManager ( )
pure virtual
Returns
The animation manager.
virtual VgICamera* VgEngine::VgIEngine::editCamera ( )
pure virtual
Returns
The camera.
virtual VgIDatabase* VgEngine::VgIEngine::editDatabase ( )
pure virtual
Returns
The database.
virtual VgFontManager* VgEngine::VgIEngine::editFontManager ( )
pure virtual
Returns
The font manager.
Version
2.0.8387
virtual VgInstanceFactory* VgEngine::VgIEngine::editInstanceFactory ( )
pure virtual
Returns
The instance factory.
virtual VgLayerManager* VgEngine::VgIEngine::editLayerManager ( )
pure virtual
Returns
The layer manager.
virtual VgILicenseManager* VgEngine::VgIEngine::editLicenseManager ( )
pure virtual
Returns
The license manager.
virtual VgRefPtr< VgLight > VgEngine::VgIEngine::editLight ( UInt  pLightNum)
pure virtual

This method gives read-write access to one of the engine lights.

Parameters
pLightNumThe index of the queried light.
Returns
A VgRefPtr containing the pointer to the light, or NULL if there is no light with this index.
Version
2.0.8744
virtual VgIResourceManager* VgEngine::VgIEngine::editResourceManager ( )
pure virtual
Returns
The resource manager.
virtual VgITextureManager* VgEngine::VgIEngine::editTextureManager ( )
pure virtual
Returns
The texture manager.
virtual std::list< VgRefPtr< VgSpatial > > VgEngine::VgIEngine::execute ( const VgQuery pQuery)
pure virtual

Executes a query to retrieve VgEngine::VgSpatial according to a VgEngine::VgQuery (e.g. all VgSpatials of the map, or having a specific ID) This call will not return results before selecting the Dataset, i.e. before VgEngine::VgIDatabase::selectDataset()

Example:

...
VgEngine::VgQuery lQuery;
typedef std::list< VgEngine::VgRefPtr< VgEngine::VgSpatial > > SpatialList;
SpatialList lSpatials;
// use VgQuery to retrieve one specific ID
// You could also retrieve all and use ->getID()
lSpatials = lEngine->execute(lQuery.where("ID",VgEngine::VgQuery::eEquals,"L-250"));
// Note you can get many lSpatials, including the labels at different LODs.
for (SpatialList::const_iterator lIter = lSpatials.begin() ; lIter != lSpatials.end(); ++lIter)
{
VgEngine:Vg3DModule::VgPoint* lPoint = lIter->get()->asPoint();
if (lPoint)
{
// modify your point here.
lPoint->setScale(...)
...
}
}
Remarks
the VgSpatial must have already been created, for labels by having done a setPlaceName/setPlaceIcon on the ID.
Make sure you do a .clear() on the VgSpatial's list before the the destruction of the VgIApplication keeping references to VgSpatial after the destruction of the VgIApplication can lead to crashes when these VgSpatials are destroyed.
Parameters
pQueryQuery to execute.
Returns
Selected spatials if any.
Version
2.0.9334
2.1.0 Updated documentation about having a reference when the VgIApplication is destroyed.
See also
VgEngine::VgQuery
VgEngine::VgSpatial
Vg3DModule::VgPoint
VgMapModule::VgIMapModule::setPlaceName
VgMapModule::VgIMapModule::setPlaceIcon
virtual const std::string& VgEngine::VgIEngine::getErrorString ( VgErrorCode  pErrorCode) const
pure virtual
Returns
The error string corresponding to an error code.
virtual VgErrorCode VgEngine::VgIEngine::getLastError ( ) const
pure virtual
Returns
The last error (an empty string is returned if no error occured).
virtual VgConstRefPtr< VgLight > VgEngine::VgIEngine::getLight ( UInt  pLightNum) const
pure virtual

This method gives read-only access to one of the engine lights.

Parameters
pLightNumThe index of the queried light.
Returns
A VgConstRefPtr containing the pointer to the light, or NULL if there is no light with this index.
Version
2.0.8744
virtual UInt VgEngine::VgIEngine::getNumLights ( ) const
pure virtual

This method returns the number of lights in the scene.

Returns
The number of lights in the scene.
Version
2.0.8744
virtual const VgPositionToolbox* VgEngine::VgIEngine::getPositionToolbox ( )
pure virtual
Returns
The toolbox for positions.
virtual const std::vector< VgEngine::VgRefPtr< VgEngine::VgIEnginePostDrawCallback > >& VgEngine::VgIEngine::getPostDrawCallbacks ( ) const
pure virtual
Returns
Registred post draw callbacks.
virtual bool VgEngine::VgIEngine::isLoaded ( VgEngine::UInt pGraphicsQueue,
VgEngine::UInt pLoadQueueSize,
VgEngine::UInt pLoadedQueueSize,
VgEngine::UInt pActiveThreads 
)
pure virtual

This method is used to check if everything is loaded at a given time Useful for screencaptures, progress bars, and resource scheduling. It is best to run it on a VgEngine::VgIEnginePostDrawCallback

Parameters
pGraphicsQueuenumber of pending graphics operation (related to graphics context)
pLoadQueueSizenumber of pending operations.
pLoadedQueueSizeanother queue waiting to be processed
pActiveThreadscurrent number of threads that are processing requests
Returns
true if everything is loaded at the moment of the call. This result takes into account a larger criteria than just the counters above.
Version
2.1.0
2.1.5 improved accuracy
See also
VgIEngine::addPostDrawCallback
virtual void VgEngine::VgIEngine::reloadShaders ( )
pure virtual

This method causes the engine to reinstantiate the shaders from source files.

Version
2.0.8744
virtual void VgEngine::VgIEngine::removePostDrawCallback ( VgEngine::VgRefPtr< VgEngine::VgIEnginePostDrawCallback >const &  pCallback)
pure virtual

This method is used to remove a VgIEnginePostDrawCallback to the engine.

Parameters
pCallbackthe post draw callback.
virtual void VgEngine::VgIEngine::replaceNamedTexture ( const std::string &  pResourceName,
VgEngine::VgRefPtr< VgEngine::VgITexture > &  pTexture 
)
pure virtual

This method is used to override a given texture resource (defined in the configuration file). If a resource exists by that name, it is replaced by the provided texture instance and all items in the scene referencing it are updated. If there is no matching texture nothing happens.

Parameters
pResourceNamethe name of the texture resource to override.
pTextureThe texture to override with.
Version
2.0.8744
virtual void VgEngine::VgIEngine::resetGraphicResources ( bool  pIsContextLost)
pure virtual

Resets all the GPU graphic resources.

Parameters
pIsContextLostUse true to specify that the context has been lost, false otherwise.
Remarks
if the context was not lost and you specify true, it will produce memory leaks in the GPU.
this is only supported on Android.
Version
2.0.7885.7885
2.1.2 added note on android only support.
virtual void VgEngine::VgIEngine::setClearColor ( const VgEngine::VgColor pClearColor)
pure virtual

This method is used to change the clear color of the VgEAGLView. If the view has an opaque background, this clear color will be hidden, except for the first few frames while the background is loading. Thus you could set the clear color of the VgEAGLView to closely match the background (of the dataset).

Remarks
this method should be called after VgIDatabase::selectDataset
Parameters
pClearColorThe new color to use for screen clearing.
Version
2.0.8955
2.1.5 updated documentation
See also
VgIDatabase::selectDataset

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