VisioMove SDK (iOS)  2.1.22
Vg3DModule::VgModelManager Interface Reference

Public Member Functions

 VgModelManager ()
 
 ~VgModelManager ()
 
VgEngine::VgRefPtr< Vg3DModule::VgIGeometrycreateModel (VgEngine::VgConstRefPtr< VgEngine::VgBinaryBuffer >const &pBuffer)
 
VgEngine::VgRefPtr< Vg3DModule::VgIGeometrycreateModel (VgEngine::VgConstRefPtr< VgEngine::VgBinaryBuffer >const &pBuffer, const std::string &pID)
 

Protected Attributes

Private * mPrivate
 

Friends

class VgEngine::VgObjectBridge
 

Detailed Description

The VgModelManager class is used to create 3D models as VgIGeometry instances given a VgBinaryBuffer.

The VgModelManager class is in charge of passing the VgBinaryBuffer data to the graphics engine and creates internal objects that allows usage of the returned model.

The below code snippet demonstrates how a VgIGeometry can be created.

#include "Modules/3D/VgI3DModule.h"
#include "Modules/3D/VgModelManager.h"
#include "VgEngine/VgIResourceManager.h"
...
...
Vg3DModule::VgI3DModule* l3DModule = (Vg3DModule::VgI3DModule*)mVgApplication->editModuleManager()->queryModule("3D");
// Create VgIGeometry from an vsg4 file and assign it to a member variable
VgEngine::VgIResourceManager* lResourceManager = mVgApplication->editEngine()->editResourceManager();
VgEngine::VgRefPtr< VgEngine::VgBinaryBuffer > lBuffer = lResourceManager->readFromFileOrURL("/path/to/file.vsg4");
Vg3DModule::VgModelManager& lModelManager = l3DModule->editModelManager();
...
// Need to add the model to a layer
lModel->setLayer(...)
mModel = lModel.get();
...
Version
2.0.8744
2.1.3 Updated and fixed documentation

Constructor & Destructor Documentation

Vg3DModule::VgModelManager::VgModelManager ( )

Constructor. Creates an useless instance. A working instance can be acquired from the Vg3DModule::VgI3DModule.

Vg3DModule::VgModelManager::~VgModelManager ( )

Destructor.

Member Function Documentation

VgEngine::VgRefPtr< Vg3DModule::VgIGeometry > Vg3DModule::VgModelManager::createModel ( VgEngine::VgConstRefPtr< VgEngine::VgBinaryBuffer >const &  pBuffer)

Creates a model from a VgBinaryBuffer. The model will not be visible until it is added to a layer via Vg3DModule::VgIGeometry::setLayer.

Parameters
pBufferThe buffer from where the model will be loaded.
VgEngine::VgRefPtr< Vg3DModule::VgIGeometry > Vg3DModule::VgModelManager::createModel ( VgEngine::VgConstRefPtr< VgEngine::VgBinaryBuffer >const &  pBuffer,
const std::string &  pID 
)

Creates a model from a VgBinaryBuffer with an ID and that notifies VgMapModule::VgIPlaceListener by default. The model will not be visible until it is added to a layer via Vg3DModule::VgIGeometry::setLayer.

Parameters
pBufferThe buffer from where the model will be loaded.
pIDID of model, if ID is empty, the model will not be clickable by default, although it can be clickable via Vg3DModule::VgIGeometry::addListener
Version
2.1.3
See also
VgMapModule::VgIPlaceListener

Friends And Related Function Documentation

friend class VgEngine::VgObjectBridge
friend

Member Data Documentation

Private* Vg3DModule::VgModelManager::mPrivate
protected

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