Ocular Engine
PLYParser.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_GRAPHICS_MESH_RESOURCE_LOADER_PLY_PARSER__H__
19 #define __H__OCULAR_GRAPHICS_MESH_RESOURCE_LOADER_PLY_PARSER__H__
20 
21 #include "Graphics/Mesh/Vertex.hpp"
22 #include "PLYEnums.hpp"
23 
24 #include <cstdint>
25 #include <vector>
26 
27 
28 //------------------------------------------------------------------------------------------
29 
34 namespace Ocular
35 {
40  namespace Graphics
41  {
45  class PLYParser
46  {
47  public:
48 
49  PLYParser();
50  ~PLYParser();
51 
63  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;
64 
65  //------------------------------------------------------------
66 
67  PLYElementType type;
68  uint32_t count;
69 
70  protected:
71 
72  bool splitProperty(std::string const& line, uint32_t tokenCount, uint32_t* tokens);
73 
74  private:
75  };
76  }
80 }
85 //------------------------------------------------------------------------------------------
86 
87 #endif
Definition: PLYParser.hpp:45
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
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
bool splitProperty(std::string const &line, uint32_t tokenCount, uint32_t *tokens)
Definition: PLYParser.cpp:48