Ocular Engine
PLYElementParser.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_GRAPHICS_MESH_RESOURCE_LOADER_PLY_ELEMENT_PARSER__H__
19 #define __H__OCULAR_GRAPHICS_MESH_RESOURCE_LOADER_PLY_ELEMENT_PARSER__H__
20 
21 #include "PLYParser.hpp"
22 #include <vector>
23 
24 //------------------------------------------------------------------------------------------
25 
30 namespace Ocular
31 {
36  namespace Graphics
37  {
41  class PLYElementParser : public PLYParser
42  {
43  public:
44 
46  virtual ~PLYElementParser();
47 
51  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;
52 
53  void addProperty(PLYPropertyType type);
54 
55  protected:
56 
57  private:
58 
59  void insertPropertyValue(int propIndex, float propValue, Vertex& vertex);
60  bool isTrailingWhitespace(std::string const& string, uint32_t const& index) const;
61 
62  std::vector<PLYPropertyType> m_Properties;
63  uint32_t m_NumProperties;
64  };
65  }
69 }
74 //------------------------------------------------------------------------------------------
75 
76 #endif
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
Definition: PLYElementParser.cpp:48
Definition: PLYParser.hpp:45
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: PLYElementParser.hpp:41
Definition: Vertex.hpp:43