Visualization Library 2.1.0

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
vl::PlyLoader Class Reference

Loads a PLY file. More...

#include <ioPLY.hpp>

Classes

class  PlyElement
 Used by PlyLoader. More...
 
class  PlyPropertyAbstract
 Used by PlyLoader. More...
 
class  PlyScalar
 Used by PlyLoader. More...
 
class  PlyScalarList
 Used by PlyLoader. More...
 

Public Types

enum  EType {
  PlyError, PlyChar, PlyUChar, PlyShort,
  PlyUShort, PlyInt, PlyUInt, PlyFloat,
  PlyDouble
}
 

Public Member Functions

 PlyLoader ()
 Constructor. More...
 
ref< ResourceDatabaseloadPly (VirtualFile *file)
 Loads a PLY file. More...
 
const std::vector< ref< PlyElement > > & elements () const
 
std::vector< ref< PlyElement > > & elements ()
 
bool binary () const
 
bool littleEndian () const
 
void readElements (VirtualFile *file)
 
void readElements (TextStream *text)
 
void newElement (PlyElement *el)
 
EType translateType (const String &type)
 
void analyzeHeader ()
 
bool readHeader (TextStream *line_reader)
 

Protected Attributes

std::vector< ref< PlyElement > > mElements
 
ref< ArrayFloat3mVerts
 
ref< ArrayFloat3mNormals
 
ref< ArrayUByte4mColors
 
std::vector< unsigned int > mIndices
 
int mVertexIndex
 
bool mBinary
 
bool mLittleEndian
 

Detailed Description

Loads a PLY file.

Definition at line 91 of file ioPLY.hpp.

Member Enumeration Documentation

◆ EType

Enumerator
PlyError 
PlyChar 
PlyUChar 
PlyShort 
PlyUShort 
PlyInt 
PlyUInt 
PlyFloat 
PlyDouble 

Definition at line 94 of file ioPLY.hpp.

Constructor & Destructor Documentation

◆ PlyLoader()

vl::PlyLoader::PlyLoader ( )
inline

Constructor.

Definition at line 239 of file ioPLY.hpp.

Member Function Documentation

◆ analyzeHeader()

void PlyLoader::analyzeHeader ( )

◆ binary()

bool vl::PlyLoader::binary ( ) const
inline

Definition at line 244 of file ioPLY.hpp.

Referenced by loadPly().

◆ elements() [1/2]

const std::vector< ref<PlyElement> >& vl::PlyLoader::elements ( ) const
inline

Definition at line 242 of file ioPLY.hpp.

Referenced by analyzeHeader(), and readHeader().

◆ elements() [2/2]

std::vector< ref<PlyElement> >& vl::PlyLoader::elements ( )
inline

Definition at line 243 of file ioPLY.hpp.

◆ littleEndian()

bool vl::PlyLoader::littleEndian ( ) const
inline

Definition at line 245 of file ioPLY.hpp.

Referenced by readElements().

◆ loadPly()

ref< ResourceDatabase > PlyLoader::loadPly ( VirtualFile file)

◆ newElement()

void PlyLoader::newElement ( PlyElement el)

◆ readElements() [1/2]

void PlyLoader::readElements ( VirtualFile file)

◆ readElements() [2/2]

void PlyLoader::readElements ( TextStream text)

Definition at line 203 of file ioPLY.cpp.

References mElements, and newElement().

◆ readHeader()

bool PlyLoader::readHeader ( TextStream line_reader)

◆ translateType()

PlyLoader::EType PlyLoader::translateType ( const String type)

Definition at line 248 of file ioPLY.cpp.

References vl::Log::error(), PlyChar, PlyDouble, PlyError, PlyFloat, PlyInt, PlyShort, PlyUChar, PlyUInt, and PlyUShort.

Referenced by readHeader().

Member Data Documentation

◆ mBinary

bool vl::PlyLoader::mBinary
protected

Definition at line 259 of file ioPLY.hpp.

Referenced by readHeader().

◆ mColors

ref<ArrayUByte4> vl::PlyLoader::mColors
protected

Definition at line 256 of file ioPLY.hpp.

Referenced by analyzeHeader(), loadPly(), newElement(), and readHeader().

◆ mElements

std::vector< ref<PlyElement> > vl::PlyLoader::mElements
protected

Definition at line 253 of file ioPLY.hpp.

Referenced by readElements().

◆ mIndices

std::vector<unsigned int> vl::PlyLoader::mIndices
protected

Definition at line 257 of file ioPLY.hpp.

Referenced by loadPly(), newElement(), and readHeader().

◆ mLittleEndian

bool vl::PlyLoader::mLittleEndian
protected

Definition at line 260 of file ioPLY.hpp.

Referenced by readHeader().

◆ mNormals

ref<ArrayFloat3> vl::PlyLoader::mNormals
protected

Definition at line 255 of file ioPLY.hpp.

Referenced by analyzeHeader(), loadPly(), newElement(), and readHeader().

◆ mVertexIndex

int vl::PlyLoader::mVertexIndex
protected

Definition at line 258 of file ioPLY.hpp.

Referenced by newElement(), and readHeader().

◆ mVerts

ref<ArrayFloat3> vl::PlyLoader::mVerts
protected

Definition at line 254 of file ioPLY.hpp.

Referenced by analyzeHeader(), loadPly(), newElement(), and readHeader().


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