Classes | Protected Member Functions | Private Member Functions | Private Attributes
edu.tum.cs.vis.model.parser.PlyParser Class Reference
Inheritance diagram for edu.tum.cs.vis.model.parser.PlyParser:
Inheritance graph
[legend]

List of all members.

Classes

class  Element
enum  FileFormat
class  Property
class  ValueLine

Protected Member Functions

boolean loadModel (String filename)

Private Member Functions

void dump ()
Number parseType (String type)
boolean processDataBuffer ()
boolean processDataLine (String parts[])
boolean processLine (String parts[])

Private Attributes

ByteBuffer byteBuffer
int currentElement = 0
ArrayList< Elementelements = new ArrayList<Element>()
FileFormat fileFormat

Detailed Description

Parser for .ply (Polygon File Format) files. Supports binary and ASCII files.

Author:
Stefan Profanter
Andrei Stoica - added edges update after parsing the triangles

Definition at line 33 of file PlyParser.java.


Member Function Documentation

void edu.tum.cs.vis.model.parser.PlyParser.dump ( ) [inline, private]

Dump ply file. Used for debugging purposes.

Definition at line 163 of file PlyParser.java.

boolean edu.tum.cs.vis.model.parser.PlyParser.loadModel ( String  filename) [inline, protected, virtual]

This function will be called from parseModel if the model isn't in the Buffer

Parameters:
filenamePhysical file of model to parse
Returns:
true if model parsed successfully. false otherwise

Implements edu.tum.cs.vis.model.parser.ModelParser.

Definition at line 180 of file PlyParser.java.

Number edu.tum.cs.vis.model.parser.PlyParser.parseType ( String  type) [inline, private]

Get next bytes of byteBuffer where type indicates which number type is expected (char, short, long, ...) and therefore how much bytes to read.

Parameters:
typeType of expected value.
Returns:
parsed value

Definition at line 464 of file PlyParser.java.

Parse current binary buffer by converting bytes into numbers and storing them in internal structure.

Returns:
true if successfully parsed.

Definition at line 499 of file PlyParser.java.

boolean edu.tum.cs.vis.model.parser.PlyParser.processDataLine ( String  parts[]) [inline, private]

Process ASCII line of data.

Parameters:
partsParts of line separated by spaces
Returns:
true if successfully parsed.

Definition at line 433 of file PlyParser.java.

boolean edu.tum.cs.vis.model.parser.PlyParser.processLine ( String  parts[]) [inline, private]

Process header line.

Parameters:
partsParts of line separated by spaces
Returns:
true if successfully parsed.

Definition at line 394 of file PlyParser.java.


Member Data Documentation

Byte buffer used for binary parsing.

Definition at line 54 of file PlyParser.java.

Index of current element which is getting parsed.

Definition at line 157 of file PlyParser.java.

ArrayList<Element> edu.tum.cs.vis.model.parser.PlyParser.elements = new ArrayList<Element>() [private]

List of all elements of ply file

Definition at line 152 of file PlyParser.java.

File format of current file

Definition at line 64 of file PlyParser.java.


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


knowrob_cad_parser
Author(s): Stefan Profanter
autogenerated on Mon Oct 6 2014 01:29:56