Euclid
Geometry Processing and Shape Analysis in C++
|
A ply writer for a common set of properties. More...
#include <PlyIO.h>
Public Member Functions | |
CommonPlyWriter (const std::vector< FloatType > &positions, const std::vector< FloatType > *normals=nullptr, const std::vector< FloatType > *texcoords=nullptr, const std::vector< IndexType > *indices=nullptr, const std::vector< ColorType > *colors=nullptr) | |
Constructor. More... | |
void | on_write () override |
On writing the ply file. More... | |
PlyHeader | generate_header (PlyFormat format) const override |
Generate the ply header. More... | |
void | write (const PlyDoubleProperty *property, std::ofstream &stream, PlyFormat format) override |
Write a PlyDoubleProperty. | |
void | write (const PlyFloatProperty *property, std::ofstream &stream, PlyFormat format) override |
Write a PlyFloatProperty. | |
void | write (const PlyIntProperty *property, std::ofstream &stream, PlyFormat format) override |
Write a PlyIntProperty. | |
void | write (const PlyUintProperty *property, std::ofstream &stream, PlyFormat format) override |
Write a PlyUintProperty. | |
void | write (const PlyUcharProperty *property, std::ofstream &stream, PlyFormat format) override |
Write a PlyUcharProperty. | |
Public Member Functions inherited from Euclid::PlyWriter | |
virtual void | write (const PlyShortProperty *, std::ofstream &, PlyFormat) |
Write a PlyShortProperty. | |
virtual void | write (const PlyUshortProperty *, std::ofstream &, PlyFormat) |
Write a PlyUshortProperty. | |
virtual void | write (const PlyCharProperty *, std::ofstream &, PlyFormat) |
Write a PlyCharProperty. | |
Additional Inherited Members | |
Protected Attributes inherited from Euclid::PlyWriter | |
bool | _sys_little_endian |
The most common ply files have the following header specification,
So this class provides a native implementation to write this type of ply files. Note that it's assumed that all faces have the same number of vertices.
|
inline |
The values of the properties are read from the buffers supplied here. Set to nullptr to omit the values of that property.
|
overridevirtual |
The PlyWriter is in charge of generating the header based on the data given.
Reimplemented from Euclid::PlyWriter.
|
overridevirtual |
This function is called right before writing the ply file. Override this function if you wish to do some preprocessing, e.g. resetting the inner iterator.
Reimplemented from Euclid::PlyWriter.