13 #ifndef OGLPLUS_SHAPES_ANALYZER_1308151449_HPP
14 #define OGLPLUS_SHAPES_ANALYZER_1308151449_HPP
16 #include <oglplus/config/basic.hpp>
26 class ShapeAnalyzerVert;
27 class ShapeAnalyzerEdge;
28 class ShapeAnalyzerFace;
39 const ShapeAnalyzerGraphData& _data;
48 const ShapeAnalyzerGraphData& data,
52 , _face_index(face_index)
53 , _vert_index(vert_index)
55 assert(_face_index < data._face_index.size());
56 assert(_vert_index < data._face_arity(_face_index));
95 const ShapeAnalyzerGraphData& _data;
103 const ShapeAnalyzerGraphData& data,
107 , _face_index(face_index)
108 , _edge_index(edge_index)
110 assert(_face_index < data._face_index.size());
111 assert(_edge_index < data._face_arity(_face_index));
144 bool HasFlag(GLuint flag)
const;
149 return HasFlag(ShapeAnalyzerGraphData::_flg_contin_edge);
155 return HasFlag(ShapeAnalyzerGraphData::_flg_smooth_edge);
161 return HasFlag(ShapeAnalyzerGraphData::_flg_strip_edge);
167 return HasFlag(ShapeAnalyzerGraphData::_flg_fan_edge);
181 const ShapeAnalyzerGraphData& _data;
192 assert(_index < data._face_index.size());
209 return _data._face_arity(_index);
258 ShapeAnalyzerGraphData _data;
261 template <
typename ShapeBuilder>
281 assert(!_data._face_index.empty());
282 return _data._face_index.size();
292 assert(face_index<_data._face_index.size());
300 #if !OGLPLUS_LINK_LIBRARY || defined(OGLPLUS_IMPLEMENTING_LIBRARY)
301 #include <oglplus/shapes/analyzer.ipp>
304 #endif // include guard
ShapeFace Face(GLuint face_index)
Returns the face_index-th face.
Definition: analyzer.hpp:290
GLuint Index(void) const
Returns the index of the vertex in its parent face.
Definition: analyzer.hpp:63
bool IsStripEdge(void) const
Returns true if the edge is a connecting edge of a triangle strip.
Definition: analyzer.hpp:159
ShapeAnalyzerEdge ShapeEdge
The class storing information about a single mesh edge.
Definition: analyzer.hpp:270
Class that analyzes vertex attribs generated by shape loaders/generators.
Definition: analyzer.hpp:255
ShapeAnalyzerVert OppositeVert(void) const
Returns the opposite vertex (if any)
ShapeAnalyzer(const ShapeBuilder &builder)
Constructor takes an initialized shape builder.
Definition: analyzer.hpp:262
bool IsSmoothEdge(void) const
Returns true if the edge is smooth.
Definition: analyzer.hpp:153
bool IsContinuousEdge(void) const
Returns true if the edge is continuous.
Definition: analyzer.hpp:147
Vec4d SmoothAttrib(void) const
Returns the value of the 'smooth' vertex attribute at the vertex.
bool HasOppositeVert(void) const
Returns true if this edge has an opposite vertex (triangles only)
ShapeAnalyzerFace Face(void) const
Returns the parent face of the vertex.
ShapeAnalyzerVert ShapeVert
The class storing information about a single mesh vertex.
Definition: analyzer.hpp:267
GLuint Index(void) const
Returns the index of the face in the mesh that it belongs to.
Definition: analyzer.hpp:196
ShapeAnalyzerFace Face(void) const
Returns the parent face of the edge.
bool HasAdjacentEdge(void) const
Returns true if this edge has an adjacent edge (and adjacent face)
ShapeAnalyzerVert Vert(GLuint vert_index) const
Returns the vert_index-th vertex of this face.
bool HasAdjacentFace(GLuint edge_index) const
Returns true if the edge_index-th edge has an adjacent face.
GLuint Index(void) const
Returns the index of the edge in its parent face.
Definition: analyzer.hpp:118
ShapeAnalyzerFace ShapeFace
The class storing information about a single mesh face.
Definition: analyzer.hpp:273
Storage of analyzed mesh/shape properties used for further processing.
ShapeAnalyzerFace AdjacentFace(GLuint edge_index) const
Returns the edge_index-th adjacent face.
Vec4d MainAttrib(void) const
Returns the value of the main vertex attribute at the vertex.
Basic template for vector types.
Definition: fwd.hpp:43
Class storing information about a single edge of a generated/loaded mesh.
Definition: analyzer.hpp:92
GLuint FaceCount(void) const
Return the number of faces generated by the generator.
Definition: analyzer.hpp:279
bool IsFanEdge(void) const
Returns true if the edge is a connecting edge of a triangle fan.
Definition: analyzer.hpp:165
ShapeAnalyzerEdge AdjacentEdge(void) const
Returns the adjacent edge to this edge.
Class storing information about a single vertex of a generated/loaded mesh.
Definition: analyzer.hpp:36
GLuint Arity(void) const
The number of edges (or vertices) of this face.
Definition: analyzer.hpp:207
ShapeAnalyzerEdge Edge(GLuint edge_index) const
Returns the edge_index-th edge of this face.
Class storing information about a single face of a generated/loaded mesh.
Definition: analyzer.hpp:178