Sirikata
|
An interface for a class that is responsible for data model objects. More...
#include <ModelsSystem.hpp>
Public Member Functions | |
virtual | ~ModelsSystem () |
virtual bool | canLoad (Transfer::DenseDataPtr data)=0 |
Check if this ModelsSystem will be able to parse the data. | |
virtual Mesh::VisualPtr | load (const Transfer::RemoteFileMetadata &metadata, const Transfer::Fingerprint &fp, Transfer::DenseDataPtr data)=0 |
Load a mesh into a Visual object. | |
virtual Mesh::VisualPtr | load (Transfer::DenseDataPtr data)=0 |
virtual bool | convertVisual (const Mesh::VisualPtr &visual, const String &format, std::ostream &vout)=0 |
Convert a Visual to the format for this ModelsSystem. | |
virtual bool | convertVisual (const Mesh::VisualPtr &visual, const String &format, const String &filename)=0 |
Convert a Visual to the format for this ModelsSystem. | |
Protected Member Functions | |
ModelsSystem () | |
ModelsSystem (ModelsSystem const &rhs) | |
ModelsSystem & | operator= (ModelsSystem const &rhs) |
An interface for a class that is responsible for data model objects.
Sirikata::ModelsSystem::ModelsSystem | ( | ) | [inline, protected] |
Sirikata::ModelsSystem::ModelsSystem | ( | ModelsSystem const & | rhs | ) | [protected] |
virtual Sirikata::ModelsSystem::~ModelsSystem | ( | ) | [inline, virtual] |
virtual bool Sirikata::ModelsSystem::canLoad | ( | Transfer::DenseDataPtr | data | ) | [pure virtual] |
Check if this ModelsSystem will be able to parse the data.
This doesn't guarantee successful parsing: generally it only checks for magic numbers to see if it is likely a supported format.
Implemented in Sirikata::AnyModelsSystem, Sirikata::BillboardSystem, Sirikata::Models::ColladaSystem, and Sirikata::PlyModelSystem.
Referenced by Sirikata::AnyModelsSystem::canLoad(), and Sirikata::AnyModelsSystem::load().
virtual bool Sirikata::ModelsSystem::convertVisual | ( | const Mesh::VisualPtr & | visual, |
const String & | format, | ||
std::ostream & | vout | ||
) | [pure virtual] |
Convert a Visual to the format for this ModelsSystem.
visual | the Visual to save to disk |
format | format hint (may or may not be used by plugin) |
vout | an output stream to write the visual's data to |
Implemented in Sirikata::AnyModelsSystem, Sirikata::BillboardSystem, Sirikata::Models::ColladaSystem, and Sirikata::PlyModelSystem.
Referenced by Sirikata::AnyModelsSystem::convertVisual(), and Sirikata::AggregateManager::uploadAggregateMesh().
virtual bool Sirikata::ModelsSystem::convertVisual | ( | const Mesh::VisualPtr & | visual, |
const String & | format, | ||
const String & | filename | ||
) | [pure virtual] |
Convert a Visual to the format for this ModelsSystem.
visual | the Visual to save to disk |
format | format hint (may or may not be used by plugin) |
filename | the file to save the serialized mesh to |
Implemented in Sirikata::AnyModelsSystem, Sirikata::BillboardSystem, Sirikata::Models::ColladaSystem, and Sirikata::PlyModelSystem.
virtual Mesh::VisualPtr Sirikata::ModelsSystem::load | ( | const Transfer::RemoteFileMetadata & | metadata, |
const Transfer::Fingerprint & | fp, | ||
Transfer::DenseDataPtr | data | ||
) | [pure virtual] |
Load a mesh into a Visual object.
Implemented in Sirikata::AnyModelsSystem, Sirikata::BillboardSystem, Sirikata::Models::ColladaSystem, and Sirikata::PlyModelSystem.
Referenced by Sirikata::BulletPhysicsService::getMeshCallback(), Sirikata::AnyModelsSystem::load(), Sirikata::JS::JSObjectScriptManager::parseMeshWork(), Sirikata::Graphics::OgreRenderer::parseMeshWorkSync(), and Sirikata::AggregateManager::uploadAggregateMesh().
virtual Mesh::VisualPtr Sirikata::ModelsSystem::load | ( | Transfer::DenseDataPtr | data | ) | [pure virtual] |
ModelsSystem& Sirikata::ModelsSystem::operator= | ( | ModelsSystem const & | rhs | ) | [protected] |