Ocular Engine
Ocular::Graphics::MeshResourceSaver_PLY Class Reference

#include <MeshResourceSaver_PLY.hpp>

Inheritance diagram for Ocular::Graphics::MeshResourceSaver_PLY:
Ocular::Graphics::MeshResourceSaver Ocular::Core::AResourceSaver

Protected Member Functions

virtual bool saveFile (Core::File const &file, VertexBuffer const *vertexBuffer, IndexBuffer const *indexBuffer) override
bool validateGeometryCount (uint32_t numVertices, uint32_t numIndices, uint32_t numFaces) const
bool writeHeader (std::ofstream &stream, uint32_t numVertices, uint32_t numFaces) const
bool writeBody (std::ofstream &stream, VertexBuffer const *vertexBuffer, IndexBuffer const *indexBuffer) const
- Protected Member Functions inherited from Ocular::Graphics::MeshResourceSaver
virtual bool isFileValid (Core::File &file)
- Protected Member Functions inherited from Ocular::Core::AResourceSaver
virtual bool writeFile (Core::File const &file, std::vector< unsigned char > buffer, Endianness fileEndianness)

Additional Inherited Members

- Public Member Functions inherited from Ocular::Graphics::MeshResourceSaver
 MeshResourceSaver (std::string const &extension)
virtual bool saveResource (Core::Resource *resource, Core::File const &file)
- Public Member Functions inherited from Ocular::Core::AResourceSaver
 AResourceSaver (std::string const &extension, ResourceType type)
virtual std::string getSupportedFileType () const
ResourceType getResourceType () const
- Protected Attributes inherited from Ocular::Core::AResourceSaver
std::string m_SupportedExtension
ResourceType m_Type

Detailed Description

Saves Mesh resources as ASCII PLY files.

Member Function Documentation

bool Ocular::Graphics::MeshResourceSaver_PLY::saveFile ( Core::File const &  file,
VertexBuffer const *  vertexBuffer,
IndexBuffer const *  indexBuffer 

Each MeshResourceSaver must provide a custom implementation for it's specific file type.

The input into this method is guaranteed to be valid. This means

  • The source file exists and is writeable
  • The dimensions are valid
  • There is a non-zero number of pixels, and their number is equal to (width * height)
[in]fileFile to write to. This file has already been verified to exist and be writeable.
[in]vertexBufferVertex data to write
[in]indexBufferIndex data to write
TRUE if the file was successfully saved.

Implements Ocular::Graphics::MeshResourceSaver.

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