The VgModelManager class is used to create 3D models as VgIGeometry instances given a VgBinaryBuffer. More...
Public Member Functions | |
VgModelManager () | |
Constructor. | |
~VgModelManager () | |
Destructor. | |
VgEngine::VgRefPtr < Vg3DModule::VgIGeometry > | createModel (VgEngine::VgConstRefPtr< VgEngine::VgBinaryBuffer >const &pBuffer) |
Creates a model from a VgBinaryBuffer. | |
Protected Attributes | |
Private * | mPrivate |
Friends | |
class | VgEngine::VgObjectBridge |
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.
... Vg3DModule::VgI3DModule* l3dModule; ... // Create VgIGeometry from an vsg4 file and assign it to a member variable VgEngine::VgRefPtr< VgEngine::VgBinaryBuffer > lBuffer = mVgApplication->editEngine()->editResourceManager()->readFromFileOrURL("/path/to/file.vsg4"); Vg3DModule::VgModelManager* lModelManager = l3dModule->editModelManager(); VgEngine::VgRefPtr< Vg3DModule::VgIGeometry > lModel = lModelManager->createModel(*lBuffer); mModel = lModel.get(); ...
Vg3DModule::VgModelManager::VgModelManager | ( | ) |
Constructor.
Creates an useless instance. A working instance can be acquired from the Vg3DModule::VgI3DModule.
Vg3DModule::VgModelManager::~VgModelManager | ( | ) |
Destructor.
VgEngine::VgRefPtr< Vg3DModule::VgIGeometry > Vg3DModule::VgModelManager::createModel | ( | VgEngine::VgConstRefPtr< VgEngine::VgBinaryBuffer >const & | pBuffer ) |
Creates a model from a VgBinaryBuffer.
pBuffer | The buffer from where the model will be loaded. |
friend class VgEngine::VgObjectBridge [friend] |
Private* Vg3DModule::VgModelManager::mPrivate [protected] |