Sirikata
Public Member Functions | Protected Member Functions
Sirikata::ModelsSystem Class Reference

An interface for a class that is responsible for data model objects. More...

#include <ModelsSystem.hpp>

Inheritance diagram for Sirikata::ModelsSystem:

List of all members.

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)
ModelsSystemoperator= (ModelsSystem const &rhs)

Detailed Description

An interface for a class that is responsible for data model objects.


Constructor & Destructor Documentation

Sirikata::ModelsSystem::ModelsSystem ( ) [inline, protected]
Sirikata::ModelsSystem::ModelsSystem ( ModelsSystem const &  rhs) [protected]
virtual Sirikata::ModelsSystem::~ModelsSystem ( ) [inline, virtual]

Member Function Documentation

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.

Parameters:
visualthe Visual to save to disk
formatformat hint (may or may not be used by plugin)
voutan output stream to write the visual's data to
Returns:
true if the conversion was successful, false otherwise

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.

Parameters:
visualthe Visual to save to disk
formatformat hint (may or may not be used by plugin)
filenamethe file to save the serialized mesh to
Returns:
true if the conversion was successful, false otherwise
Deprecated:
You should use the version of this method that takes a std::ostream instead.

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]
virtual Mesh::VisualPtr Sirikata::ModelsSystem::load ( Transfer::DenseDataPtr  data) [pure virtual]
ModelsSystem& Sirikata::ModelsSystem::operator= ( ModelsSystem const &  rhs) [protected]

The documentation for this class was generated from the following file: