Ocular Engine
Ocular::Graphics::PLYElementParser Class Reference
Inheritance diagram for Ocular::Graphics::PLYElementParser:
Ocular::Graphics::PLYParser

Public Member Functions

virtual bool parse (std::string const &line, std::vector< Vertex > &vertices, std::vector< uint32_t > &indices, uint32_t &currVert, uint32_t &currIndex, Math::Vector3f &min, Math::Vector3f &max, bool isASCII=true) override
 
void addProperty (PLYPropertyType type)
 

Additional Inherited Members

- Public Attributes inherited from Ocular::Graphics::PLYParser
PLYElementType type
 
uint32_t count
 
- Protected Member Functions inherited from Ocular::Graphics::PLYParser
bool splitProperty (std::string const &line, uint32_t tokenCount, uint32_t *tokens)
 

Member Function Documentation

bool Ocular::Graphics::PLYElementParser::parse ( std::string const &  line,
std::vector< Vertex > &  vertices,
std::vector< uint32_t > &  indices,
uint32_t &  currVert,
uint32_t &  currIndex,
Math::Vector3f min,
Math::Vector3f max,
bool  isASCII = true 
)
overridevirtual
Note
Currently unsafe. May crash if more than expected number of token delimiters (' ') is encountered in the property line.

Each line represents a single element defined by a variable number of properties. An example of a line that may be parsed is:

0.0 1.0 0.0

Which was defined as:

element vertex 1
property float x
property float y
property float z

So it is the positional vector of a vertex with value (0.0, 1.0, 0.0).

Implements Ocular::Graphics::PLYParser.


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