Thea
|
Codec for reading and writing OFF files. More...
#include <MeshCodecOff.hpp>
Inherits CodecOffBase< MeshT >.
Classes | |
class | ReadOptions |
Options for deserializing meshes. More... | |
class | WriteOptions |
Options for serializing meshes. More... | |
Public Types | |
typedef BuilderT | Builder |
The mesh builder class used by the codec. More... | |
typedef std::array< int8,(size_t) MAGIC_LENGTH > | MagicString |
The type of the codec's magic string (an array of MAGIC_LENGTH bytes). More... | |
typedef MeshT | Mesh |
The type of mesh processed by the codec. More... | |
typedef Graphics::MeshGroup< Mesh > | MeshGroup |
A group of meshes. More... | |
typedef MeshGroup::MeshPtr | MeshPtr |
A shared pointer to a mesh. More... | |
typedef BaseT::ReadCallback | ReadCallback |
Called when a mesh element is read. More... | |
typedef BaseT::WriteCallback | WriteCallback |
Called when a mesh element is written. More... | |
Public Member Functions | |
CodecOff (ReadOptions const &read_opts_=ReadOptions::defaults(), WriteOptions const &write_opts_=WriteOptions::defaults()) | |
Constructor. More... | |
operator intx () const | |
Implicitly convert to an integer value for use in switch statements etc. More... | |
bool | operator== (Codec const &other) const |
Check if two codecs are equal. More... | |
virtual void | readMeshGroup (MeshGroup< Mesh > &mesh_group, BinaryInputStream &input, Codec::BlockHeader const *block_header, ReadCallback *callback) const =0 |
Read a mesh group from a binary output stream. More... | |
int8 | setName (char const *s) |
Set the name of the object. More... | |
virtual void | writeMeshGroup (MeshGroup< Mesh > const &mesh_group, BinaryOutputStream &output, bool write_block_header, WriteCallback *callback) const =0 |
Write a mesh group to a binary output stream. More... | |
Static Public Member Functions | |
static MagicString | toMagic (std::string const &s) |
Convenience function to convert a string literal to a magic string. More... | |
Static Public Attributes | |
static intx const | MAGIC_LENGTH = 8 |
The standard length (in bytes) of the codec's magic string as used in BlockHeader. More... | |
Codec for reading and writing OFF files.
Definition at line 101 of file MeshCodec.hpp.
typedef BuilderT Builder |
The mesh builder class used by the codec.
Definition at line 54 of file MeshCodecOff.hpp.
|
inherited |
typedef MeshT Mesh |
The type of mesh processed by the codec.
Definition at line 51 of file MeshCodecOff.hpp.
typedef Graphics::MeshGroup<Mesh> MeshGroup |
A group of meshes.
Definition at line 52 of file MeshCodecOff.hpp.
typedef MeshGroup::MeshPtr MeshPtr |
A shared pointer to a mesh.
Definition at line 53 of file MeshCodecOff.hpp.
typedef BaseT::ReadCallback ReadCallback |
Called when a mesh element is read.
Definition at line 55 of file MeshCodecOff.hpp.
typedef BaseT::WriteCallback WriteCallback |
Called when a mesh element is written.
Definition at line 56 of file MeshCodecOff.hpp.
CodecOff | ( | ReadOptions const & | read_opts_ = ReadOptions::defaults() , |
WriteOptions const & | write_opts_ = WriteOptions::defaults() |
||
) |
Constructor.
Definition at line 125 of file MeshCodecOff.hpp.
|
inherited |
|
inherited |
|
pure virtualinherited |
Read a mesh group from a binary output stream.
Any block header, if present, is assumed to have already been extracted from the stream and stored in the object pointed to by block_header. Else, block_header should be a null pointer.
|
virtualinherited |
Set the name of the object.
Implements INamedObject.
|
staticinherited |
|
pure virtualinherited |
Write a mesh group to a binary output stream.
Optionally (if write_block_header is true) prefixes extra information about the mesh block such as its size and type (which may have not been specified in the encoding format itself).
|
staticinherited |
The standard length (in bytes) of the codec's magic string as used in BlockHeader.