Ocular Engine
|
#include <MeshResourceSaver.hpp>
Public Member Functions | |
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 Member Functions | |
virtual bool | saveFile (Core::File const &file, VertexBuffer const *vertexBuffer, IndexBuffer const *indexBuffer)=0 |
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 | |
Protected Attributes inherited from Ocular::Core::AResourceSaver | |
std::string | m_SupportedExtension |
ResourceType | m_Type |
This is a common base implementation for all other ResourceSavers that deal with saving Mesh resources to disk. It provides a common base saveResource method as well as multiple utility helper methods.
By inheriting from MeshResourceSaver instead of AResourceSaver, the developer needs to only worry about their specific saveFile implementation.
|
protectedvirtual |
Checks if the specified file is valid. It can be valid in one of two ways:
|
protectedpure virtual |
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
[in] | file | File to write to. This file has already been verified to exist and be writeable. |
[in] | vertexBuffer | Vertex data to write |
[in] | indexBuffer | Index data to write |
Implemented in Ocular::Graphics::MeshResourceSaver_PLY.
|
virtual |
[in] | resource | |
[in] | file |
Reimplemented from Ocular::Core::AResourceSaver.