Sirikata
|
Implementation of ModelsSystem that loads and saves PLY files. More...
#include <PlyModelSystem.hpp>
Public Member Functions | |
PlyModelSystem () | |
virtual | ~PlyModelSystem () |
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. |
Implementation of ModelsSystem that loads and saves PLY files.
Sirikata::PlyModelSystem::PlyModelSystem | ( | ) |
Sirikata::PlyModelSystem::~PlyModelSystem | ( | ) | [virtual] |
bool Sirikata::PlyModelSystem::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.
Referenced by load().
bool Sirikata::PlyModelSystem::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 NOT_IMPLEMENTED.
bool Sirikata::PlyModelSystem::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 NOT_IMPLEMENTED.
Mesh::VisualPtr Sirikata::PlyModelSystem::load | ( | Transfer::DenseDataPtr | data | ) | [virtual] |
Implements Sirikata::ModelsSystem.
References load().
Mesh::VisualPtr Sirikata::PlyModelSystem::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::Mesh::MaterialEffectInfo::Texture::affecting, ALPHA, BADCOLOR, BLUE, canLoad(), Sirikata::Mesh::MaterialEffectInfo::Texture::color, Sirikata::Mesh::MaterialEffectInfo::Texture::DIFFUSE, EDGE, FACE, FILLER, Sirikata::Mesh::GeometryInstance::geometryIndex, Sirikata::Transfer::RemoteFileMetadata::getURI(), GREEN, Sirikata::Mesh::SubMeshGeometry::Primitive::LINES, Sirikata::Mesh::MaterialEffectInfo::Texture::magFilter, Sirikata::Mesh::MaterialEffectInfo::Texture::maxMipLevel, Sirikata::Mesh::MaterialEffectInfo::Texture::minFilter, Sirikata::Mesh::MaterialEffectInfo::Texture::mipBias, Sirikata::Mesh::NullNodeIndex, Sirikata::Mesh::Node::parent, Sirikata::Mesh::GeometryInstance::parentNode, Sirikata::Mesh::SubMeshGeometry::primitives, Sirikata::Mesh::SubMeshGeometry::Primitive::primitiveType, RED, Sirikata::Mesh::MaterialEffectInfo::reflectivity, Sirikata::Mesh::MaterialEffectInfo::Texture::SAMPLER_FILTER_LINEAR, Sirikata::Mesh::MaterialEffectInfo::Texture::SAMPLER_TYPE_2D, Sirikata::Mesh::MaterialEffectInfo::Texture::samplerType, Sirikata::Mesh::MaterialEffectInfo::shininess, Sirikata::Mesh::SubMeshGeometry::TextureSet::stride, TC, Sirikata::Mesh::MaterialEffectInfo::Texture::texCoord, Sirikata::Mesh::MaterialEffectInfo::textures, Sirikata::Transfer::URI::toString(), Sirikata::Mesh::SubMeshGeometry::Primitive::TRIANGLES, Sirikata::Mesh::MaterialEffectInfo::Texture::uri, Sirikata::Mesh::SubMeshGeometry::TextureSet::uvs, VERTEX, VI, Sirikata::Mesh::MaterialEffectInfo::Texture::WRAP_MODE_WRAP, Sirikata::Mesh::MaterialEffectInfo::Texture::wrapS, Sirikata::Mesh::MaterialEffectInfo::Texture::wrapT, Sirikata::Mesh::MaterialEffectInfo::Texture::wrapU, X, Y, and Z.
Referenced by load().