Euclid
Geometry Processing and Shape Analysis in C++
Euclid::PlyWriter Class Reference

An abstract ply writer. More...

#include <PlyIO.h>

Inheritance diagram for Euclid::PlyWriter:
Euclid::CommonPlyWriter< VN, FloatType, IndexType, ColorType >

Public Member Functions

virtual void on_write ()
 On writing the ply file. More...
 
virtual PlyHeader generate_header (PlyFormat format) const
 Generate the ply header. More...
 
virtual void write (const PlyDoubleProperty *, std::ofstream &, PlyFormat)
 Write a PlyDoubleProperty.
 
virtual void write (const PlyFloatProperty *, std::ofstream &, PlyFormat)
 Write a PlyFloatProperty.
 
virtual void write (const PlyIntProperty *, std::ofstream &, PlyFormat)
 Write a PlyIntProperty.
 
virtual void write (const PlyUintProperty *, std::ofstream &, PlyFormat)
 Write a PlyUintProperty.
 
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.
 
virtual void write (const PlyUcharProperty *, std::ofstream &, PlyFormat)
 Write a PlyUcharProperty.
 

Protected Attributes

bool _sys_little_endian
 

Detailed Description

This class serves as an abstract base class for a ply file writer. A ply writer is supposed to be supplied to the function write_ply to customize the process of writing a ply file. A PlyWriter is used in the following way,

  1. write_ply will call PlyWriter::on_write.
  2. Header will be write to the file.
  3. write_ply will then call PlyWriter::write to do the actual writing.

Note

You should use the CommonPlyWriter class to write the most common ply format.

See also
write_ply CommonPlyWriter

Member Function Documentation

virtual PlyHeader Euclid::PlyWriter::generate_header ( PlyFormat  format) const
inlinevirtual

The PlyWriter is in charge of generating the header based on the data given.

Reimplemented in Euclid::CommonPlyWriter< VN, FloatType, IndexType, ColorType >.

virtual void Euclid::PlyWriter::on_write ( )
inlinevirtual

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 in Euclid::CommonPlyWriter< VN, FloatType, IndexType, ColorType >.


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