Support Forum       G3D Web Page     
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
G3D::ParsePLY Class Reference

Parses PLY geometry files to extract face and vertex information. More...

Classes

class  Property
 

Public Types

enum  DataType {
  char_type,
  uchar_type,
  short_type,
  ushort_type,
  int_type,
  uint_type,
  float_type,
  double_type,
  list_type,
  none_type
}
 
The order must be maintained More...
 
typedef SmallArray< int, 6 > Face
 
typedef Array< int > TriStrip
 A -1 inside the triStrip means "restart". More...
 

Public Member Functions

 ParsePLY ()
 
 ~ParsePLY ()
 
void clear ()
 
void parse (BinaryInput &bi)
 

Static Public Member Functions

static size_t byteSize (DataType d)
 
static DataType parseDataType (const char *t)
 

Public Attributes

FacefaceArray
 Only one of faceArray and triStripArray will be non-nullptr. More...
 
Array< PropertyfaceOrTriStripProperty
 Face or tristrip properties. More...
 
int numFaces
 
int numTriStrips
 
int numVertices
 
TriStriptriStripArray
 Only one of faceArray and triStripArray will be non-nullptr. More...
 
float * vertexData
 vertexData[v*vertexPropertyArray.size() + p] is a float representing property p for vertex v. More...
 
Array< PropertyvertexProperty
 

Detailed Description

Parses PLY geometry files to extract face and vertex information.

The input file is required to contain only vertex and (face or triStrip) elements, in that order. Each may have any number of properties.

Referenced Code: http://paulbourke.net/dataformats/ply/
See also
G3D::ParseMTL, G3D::ParseOBJ, G3D::ArticulatedModel

Member Typedef Documentation

◆ Face

◆ TriStrip

A -1 inside the triStrip means "restart".

Member Enumeration Documentation

◆ DataType


The order must be maintained

char character 1 uchar unsigned character 1 short short integer 2 ushort unsigned short integer 2 int integer 4 uint unsigned integer 4 float single-precision float 4 double double-precision float 8

Enumerator
char_type 
uchar_type 
short_type 
ushort_type 
int_type 
uint_type 
float_type 
double_type 
list_type 
none_type 

Constructor & Destructor Documentation

◆ ParsePLY()

G3D::ParsePLY::ParsePLY ( )

◆ ~ParsePLY()

G3D::ParsePLY::~ParsePLY ( )

Member Function Documentation

◆ byteSize()

static size_t G3D::ParsePLY::byteSize ( DataType  d)
static

◆ clear()

void G3D::ParsePLY::clear ( )

◆ parse()

void G3D::ParsePLY::parse ( BinaryInput bi)

◆ parseDataType()

static DataType G3D::ParsePLY::parseDataType ( const char *  t)
static

Member Data Documentation

◆ faceArray

Face* G3D::ParsePLY::faceArray

Only one of faceArray and triStripArray will be non-nullptr.

◆ faceOrTriStripProperty

Array<Property> G3D::ParsePLY::faceOrTriStripProperty

Face or tristrip properties.

◆ numFaces

int G3D::ParsePLY::numFaces

◆ numTriStrips

int G3D::ParsePLY::numTriStrips

◆ numVertices

int G3D::ParsePLY::numVertices

◆ triStripArray

TriStrip* G3D::ParsePLY::triStripArray

Only one of faceArray and triStripArray will be non-nullptr.

◆ vertexData

float* G3D::ParsePLY::vertexData

vertexData[v*vertexPropertyArray.size() + p] is a float representing property p for vertex v.

If property p is a list type, the value is zero.

◆ vertexProperty

Array<Property> G3D::ParsePLY::vertexProperty

documentation generated on Wed Nov 24 2021 08:01:58 using doxygen 1.8.15