|
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)=0 |
|
|
PLYElementType | type |
|
uint32_t | count |
|
|
bool | splitProperty (std::string const &line, uint32_t tokenCount, uint32_t *tokens) |
|
virtual bool Ocular::Graphics::PLYParser::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 |
|
) |
| |
|
pure virtual |
Parses a single line of a PLY file.
- Parameters
-
[in] | line | The currently line of the PLY file to parse |
[out] | vertices | Vector of mesh vertices |
[out] | indices | Vector of mesh indices |
[out] | currVert | The current vertices index. If one or more indices were added in this parse, increment this accordingly. |
[out] | currIndex | The current indices index. If one or more indices were added in this parse, increment this accordingly. |
- Returns
- TRUE if the line was parsed without any errors.
Implemented in Ocular::Graphics::PLYElementParser, and Ocular::Graphics::PLYElementListParser.
bool Ocular::Graphics::PLYParser::splitProperty |
( |
std::string const & |
line, |
|
|
uint32_t |
tokenCount, |
|
|
uint32_t * |
tokens |
|
) |
| |
|
protected |
A very specialized string splitter used to tokenize property lines. Given the nature of the PLY format, the following assumptions can be madeL
- The delimiter is always a space (' ')
- We already know how many tokens to expect
We also don't care about placing the tokens into individual strings or buffers. Instead we can employ just their index, so there is no need to copy string data around.
The documentation for this class was generated from the following files:
- C:/Projects/OcularEngine/OcularCore/include/Graphics/Mesh/MeshLoaders/PLY/PLYParser.hpp
- C:/Projects/OcularEngine/OcularCore/src/Graphics/Mesh/MeshLoaders/PLY/PLYParser.cpp