OpenMesh::IO::_PLYReader_ Class Reference

#include <PLYReader.hh>

Inheritance diagram for OpenMesh::IO::_PLYReader_:
Inheritance graph
[legend]

List of all members.

Public Types

enum  ValueType {
  Unsupported, ValueTypeINT8, ValueTypeCHAR, ValueTypeUINT8,
  ValueTypeUCHAR, ValueTypeINT16, ValueTypeSHORT, ValueTypeUINT16,
  ValueTypeUSHORT, ValueTypeINT32, ValueTypeINT, ValueTypeUINT32,
  ValueTypeUINT, ValueTypeFLOAT32, ValueTypeFLOAT, ValueTypeFLOAT64,
  ValueTypeDOUBLE
}

Public Member Functions

 _PLYReader_ ()
bool can_u_read (const std::string &_filename) const
 Returns true if reader can parse _filename (checks extension).
std::string get_description () const
 Returns a brief description of the file type that can be parsed.
std::string get_extensions () const
std::string get_magic () const
 Return magic bits used to determine file format.
bool read (std::istream &_is, BaseImporter &_bi, Options &_opt)
bool read (const std::string &_filename, BaseImporter &_bi, Options &_opt)

Private Types

enum  VertexProperty {
  XCOORD, YCOORD, ZCOORD, TEXX,
  TEXY, COLORRED, COLORGREEN, COLORBLUE,
  COLORALPHA, UNSUPPORTED
}

Private Member Functions

bool can_u_read (std::istream &_is) const
void consume_input (std::istream &_in, int _count) const
 Read unsupported properties in PLY file.
bool read_ascii (std::istream &_in, BaseImporter &_bi) const
bool read_binary (std::istream &_in, BaseImporter &_bi, bool swap) const
void readInteger (ValueType _type, std::istream &_in, unsigned int &_value) const
void readInteger (ValueType _type, std::istream &_in, int &_value) const
float readToFloatValue (ValueType _type, std::fstream &_in) const
void readValue (ValueType _type, std::istream &_in, int &_value) const
void readValue (ValueType _type, std::istream &_in, unsigned int &_value) const
void readValue (ValueType _type, std::istream &_in, double &_value) const
void readValue (ValueType _type, std::istream &_in, float &_value) const

Private Attributes

unsigned char buff [8]
unsigned int faceCount_
ValueType faceEntryType_
ValueType faceIndexType_
Options options_
 Available options for reading.
std::map< ValueType, int > scalar_size_
 Stores sizes of property types.
Options userOptions_
 Options that the user wants to read.
unsigned int vertexCount_
uint vertexDimension_
unsigned int vertexPropertyCount_
std::map< int, std::pair
< VertexProperty, ValueType > > 
vertexPropertyMap_
ValueType vertexType_

Detailed Description

Implementation of the PLY format reader. This class is singleton'ed by SingletonT to OFFReader.

Definition at line 92 of file PLYReader.hh.


Member Enumeration Documentation

Enumerator:
Unsupported 
ValueTypeINT8 
ValueTypeCHAR 
ValueTypeUINT8 
ValueTypeUCHAR 
ValueTypeINT16 
ValueTypeSHORT 
ValueTypeUINT16 
ValueTypeUSHORT 
ValueTypeINT32 
ValueTypeINT 
ValueTypeUINT32 
ValueTypeUINT 
ValueTypeFLOAT32 
ValueTypeFLOAT 
ValueTypeFLOAT64 
ValueTypeDOUBLE 

Definition at line 112 of file PLYReader.hh.

Enumerator:
XCOORD 
YCOORD 
ZCOORD 
TEXX 
TEXY 
COLORRED 
COLORGREEN 
COLORBLUE 
COLORALPHA 
UNSUPPORTED 

Definition at line 163 of file PLYReader.hh.


Constructor & Destructor Documentation

OpenMesh::IO::_PLYReader_::_PLYReader_ (  ) 

Member Function Documentation

bool OpenMesh::IO::_PLYReader_::can_u_read ( std::istream &  _is  )  const [private]
bool OpenMesh::IO::_PLYReader_::can_u_read ( const std::string &  _filename  )  const [virtual]

Returns true if reader can parse _filename (checks extension).

Reimplemented from OpenMesh::IO::BaseReader.

void OpenMesh::IO::_PLYReader_::consume_input ( std::istream &  _in,
int  _count 
) const [inline, private]

Read unsupported properties in PLY file.

Definition at line 142 of file PLYReader.hh.

std::string OpenMesh::IO::_PLYReader_::get_description (  )  const [inline, virtual]

Returns a brief description of the file type that can be parsed.

Implements OpenMesh::IO::BaseReader.

Definition at line 98 of file PLYReader.hh.

std::string OpenMesh::IO::_PLYReader_::get_extensions (  )  const [inline, virtual]

Returns a string with the accepted file extensions separated by a whitespace and in small caps.

Implements OpenMesh::IO::BaseReader.

Definition at line 99 of file PLYReader.hh.

std::string OpenMesh::IO::_PLYReader_::get_magic (  )  const [inline, virtual]

Return magic bits used to determine file format.

Reimplemented from OpenMesh::IO::BaseReader.

Definition at line 100 of file PLYReader.hh.

bool OpenMesh::IO::_PLYReader_::read ( std::istream &  _is,
BaseImporter _bi,
Options _opt 
) [virtual]

Reads a mesh given by a std::stream. This method usually uses the same stream reading method that read uses. Options can be passed via _opt. After execution _opt contains the Options that were available

Implements OpenMesh::IO::BaseReader.

bool OpenMesh::IO::_PLYReader_::read ( const std::string &  _filename,
BaseImporter _bi,
Options _opt 
) [virtual]

Reads a mesh given by a filename. Usually this method opens a stream and passes it to stream read method. Acceptance checks by filename extension can be placed here.

Options can be passed via _opt. After execution _opt contains the Options that were available

Implements OpenMesh::IO::BaseReader.

bool OpenMesh::IO::_PLYReader_::read_ascii ( std::istream &  _in,
BaseImporter _bi 
) const [private]
bool OpenMesh::IO::_PLYReader_::read_binary ( std::istream &  _in,
BaseImporter _bi,
bool  swap 
) const [private]
void OpenMesh::IO::_PLYReader_::readInteger ( ValueType  _type,
std::istream &  _in,
unsigned int &  _value 
) const [private]
void OpenMesh::IO::_PLYReader_::readInteger ( ValueType  _type,
std::istream &  _in,
int &  _value 
) const [private]
float OpenMesh::IO::_PLYReader_::readToFloatValue ( ValueType  _type,
std::fstream &  _in 
) const [private]
void OpenMesh::IO::_PLYReader_::readValue ( ValueType  _type,
std::istream &  _in,
int &  _value 
) const [private]
void OpenMesh::IO::_PLYReader_::readValue ( ValueType  _type,
std::istream &  _in,
unsigned int &  _value 
) const [private]
void OpenMesh::IO::_PLYReader_::readValue ( ValueType  _type,
std::istream &  _in,
double &  _value 
) const [private]
void OpenMesh::IO::_PLYReader_::readValue ( ValueType  _type,
std::istream &  _in,
float &  _value 
) const [private]

Member Data Documentation

unsigned char OpenMesh::IO::_PLYReader_::buff[8] [mutable, private]

Definition at line 146 of file PLYReader.hh.

unsigned int OpenMesh::IO::_PLYReader_::faceCount_ [mutable, private]

Definition at line 155 of file PLYReader.hh.

Definition at line 161 of file PLYReader.hh.

Definition at line 160 of file PLYReader.hh.

Available options for reading.

Definition at line 149 of file PLYReader.hh.

std::map<ValueType, int> OpenMesh::IO::_PLYReader_::scalar_size_ [mutable, private]

Stores sizes of property types.

Definition at line 171 of file PLYReader.hh.

Options that the user wants to read.

Definition at line 152 of file PLYReader.hh.

unsigned int OpenMesh::IO::_PLYReader_::vertexCount_ [mutable, private]

Definition at line 154 of file PLYReader.hh.

Definition at line 158 of file PLYReader.hh.

unsigned int OpenMesh::IO::_PLYReader_::vertexPropertyCount_ [mutable, private]

Definition at line 174 of file PLYReader.hh.

std::map< int , std::pair< VertexProperty, ValueType> > OpenMesh::IO::_PLYReader_::vertexPropertyMap_ [mutable, private]

Definition at line 175 of file PLYReader.hh.

Definition at line 157 of file PLYReader.hh.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


openmesh
Author(s): Benjamin Pitzer
autogenerated on Fri Jan 11 12:11:17 2013