Euclid
Geometry Processing and Shape Analysis in C++
|
A ply reader for a common set of properties. More...
#include <PlyIO.h>
Public Member Functions | |
CommonPlyReader (std::vector< FloatType > &positions, std::vector< FloatType > *normals=nullptr, std::vector< FloatType > *texcoords=nullptr, std::vector< IndexType > *indices=nullptr, std::vector< ColorType > *colors=nullptr) | |
Constructor. More... | |
void | on_read (const PlyHeader &header) override |
On reading the header. More... | |
void | read (const PlyDoubleProperty *property, std::ifstream &stream, PlyFormat format) override |
Read a PlyDoubleProperty. | |
void | read (const PlyFloatProperty *property, std::ifstream &stream, PlyFormat format) override |
Read a PlyFloatProperty. | |
void | read (const PlyIntProperty *property, std::ifstream &stream, PlyFormat format) override |
Read a PlyIntProperty. | |
void | read (const PlyUintProperty *property, std::ifstream &stream, PlyFormat format) override |
Read a PlyUintProperty. | |
void | read (const PlyUcharProperty *property, std::ifstream &stream, PlyFormat format) override |
Read a PlyUcharProperty. | |
Public Member Functions inherited from Euclid::PlyReader | |
virtual void | read (const PlyShortProperty *, std::ifstream &, PlyFormat) |
Read a PlyShortProperty. | |
virtual void | read (const PlyUshortProperty *, std::ifstream &, PlyFormat) |
Read a PlyUshortProperty. | |
virtual void | read (const PlyCharProperty *, std::ifstream &, PlyFormat) |
Read a PlyCharProperty. | |
Additional Inherited Members | |
Protected Attributes inherited from Euclid::PlyReader | |
bool | _sys_little_endian |
The most common ply files have the following header specification,
So this class provides a native implementation to read 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 stored into the buffers supplied here. Set to nullptr to omit the values of that property.
|
overridevirtual |
This function is called right after the header specification is retrieved from the file. Override this function if you wish to do some preprocessing before reading the ply body, e.g. allocating space for buffers.
Reimplemented from Euclid::PlyReader.