Sirikata
|
AnyModelsSystem is an implementation of ModelsSystem which uses all other available implementations to handle as wide a variety of meshes as possible. More...
#include <AnyModelsSystem.hpp>
Public Member Functions | |
virtual | ~AnyModelsSystem () |
virtual bool | canLoad (Transfer::DenseDataPtr data) |
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) |
Load a mesh into a Visual object. | |
virtual Mesh::VisualPtr | load (Transfer::DenseDataPtr data) |
virtual bool | convertVisual (const Mesh::VisualPtr &visual, const String &format, std::ostream &vout) |
Convert a Visual to the format for this ModelsSystem. | |
virtual bool | convertVisual (const Mesh::VisualPtr &visual, const String &format, const String &filename) |
Convert a Visual to the format for this ModelsSystem. | |
Static Public Member Functions | |
static const String & | name () |
static ModelsSystem * | create (const String &args) |
Private Types | |
typedef std::map< String, ModelsSystem * > | SystemsMap |
Private Member Functions | |
AnyModelsSystem () | |
AnyModelsSystem (const AnyModelsSystem &rhs) | |
AnyModelsSystem & | operator= (const AnyModelsSystem &rhs) |
Private Attributes | |
SystemsMap | mModelsSystems |
Static Private Attributes | |
static String | sAnyName |
AnyModelsSystem is an implementation of ModelsSystem which uses all other available implementations to handle as wide a variety of meshes as possible.
typedef std::map<String, ModelsSystem*> Sirikata::AnyModelsSystem::SystemsMap [private] |
Sirikata::AnyModelsSystem::~AnyModelsSystem | ( | ) | [virtual] |
References mModelsSystems.
Sirikata::AnyModelsSystem::AnyModelsSystem | ( | ) | [private] |
Sirikata::AnyModelsSystem::AnyModelsSystem | ( | const AnyModelsSystem & | rhs | ) | [private] |
bool Sirikata::AnyModelsSystem::canLoad | ( | Transfer::DenseDataPtr | data | ) | [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.
Implements Sirikata::ModelsSystem.
References Sirikata::ModelsSystem::canLoad(), and mModelsSystems.
bool Sirikata::AnyModelsSystem::convertVisual | ( | const Mesh::VisualPtr & | visual, |
const String & | format, | ||
std::ostream & | vout | ||
) | [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 |
Implements Sirikata::ModelsSystem.
References Sirikata::ModelsSystem::convertVisual(), Sirikata::Logging::error, mModelsSystems, and SILOG.
bool Sirikata::AnyModelsSystem::convertVisual | ( | const Mesh::VisualPtr & | visual, |
const String & | format, | ||
const String & | filename | ||
) | [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 |
Implements Sirikata::ModelsSystem.
References Sirikata::ModelsSystem::convertVisual(), Sirikata::Logging::error, mModelsSystems, and SILOG.
ModelsSystem * Sirikata::AnyModelsSystem::create | ( | const String & | args | ) | [static] |
References AnyModelsSystem().
Referenced by Sirikata::ModelsSystemFactory::ModelsSystemFactory().
Mesh::VisualPtr Sirikata::AnyModelsSystem::load | ( | Transfer::DenseDataPtr | data | ) | [virtual] |
Implements Sirikata::ModelsSystem.
References Sirikata::ModelsSystem::canLoad(), Sirikata::Logging::error, Sirikata::ModelsSystem::load(), mModelsSystems, and SILOG.
Mesh::VisualPtr Sirikata::AnyModelsSystem::load | ( | const Transfer::RemoteFileMetadata & | metadata, |
const Transfer::Fingerprint & | fp, | ||
Transfer::DenseDataPtr | data | ||
) | [virtual] |
Load a mesh into a Visual object.
Implements Sirikata::ModelsSystem.
References Sirikata::ModelsSystem::canLoad(), Sirikata::Logging::error, Sirikata::Transfer::RemoteFileMetadata::getURI(), Sirikata::ModelsSystem::load(), mModelsSystems, and SILOG.
static const String& Sirikata::AnyModelsSystem::name | ( | ) | [inline, static] |
AnyModelsSystem& Sirikata::AnyModelsSystem::operator= | ( | const AnyModelsSystem & | rhs | ) | [private] |
Referenced by AnyModelsSystem(), canLoad(), convertVisual(), load(), and ~AnyModelsSystem().
String Sirikata::AnyModelsSystem::sAnyName [static, private] |
Referenced by AnyModelsSystem().