Support Forum G3D Web Page |
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 | |
Face * | faceArray |
Only one of faceArray and triStripArray will be non-nullptr. More... | |
Array< Property > | faceOrTriStripProperty |
Face or tristrip properties. More... | |
int | numFaces |
int | numTriStrips |
int | numVertices |
TriStrip * | triStripArray |
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< Property > | vertexProperty |
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.
typedef SmallArray<int, 6> G3D::ParsePLY::Face |
typedef Array<int> G3D::ParsePLY::TriStrip |
A -1 inside the triStrip means "restart".
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 |
G3D::ParsePLY::ParsePLY | ( | ) |
G3D::ParsePLY::~ParsePLY | ( | ) |
|
static |
void G3D::ParsePLY::clear | ( | ) |
void G3D::ParsePLY::parse | ( | BinaryInput & | bi | ) |
|
static |
Face* G3D::ParsePLY::faceArray |
Only one of faceArray and triStripArray will be non-nullptr.
int G3D::ParsePLY::numFaces |
int G3D::ParsePLY::numTriStrips |
int G3D::ParsePLY::numVertices |
TriStrip* G3D::ParsePLY::triStripArray |
Only one of faceArray and triStripArray will be non-nullptr.
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.