IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Mesh3dTypes.h
Go to the documentation of this file.
1 // Mesh3dTypes.h:
3 // --------------
4 //
14 
15 #ifndef __IPSDKGEOMETRY_MESH3DTYPES_H__
16 #define __IPSDKGEOMETRY_MESH3DTYPES_H__
17 
19 #include <IPSDKGeometry/Entity/3d/Point/Point3dData.h>
21 
22 namespace ipsdk {
23 namespace geom {
24 
25 template <typename T>
26 class Mesh3d;
27 
30 
34 
37 
40 )
41 
42 
51 struct Mesh3dHalfEdge
52 {
55 
58 
62 
65 };
66 
68 struct TriVertexIx
69 {
70 
73 
76 
79 
80  bool operator== (const TriVertexIx& triVertexIx) const
81  {
82  return _vertexIx0 == triVertexIx._vertexIx0 && _vertexIx1 == triVertexIx._vertexIx1 && _vertexIx2 == triVertexIx._vertexIx2;
83  }
84 
86  ipInt32 get(ipInt32 idx)
87  {
88  assert(idx >= 0 && idx < 3);
89  if (idx == 0)
90  return _vertexIx0;
91  else if (idx == 1)
92  return _vertexIx1;
93  else if (idx == 2)
94  return _vertexIx2;
95 
96  return -1;
97  }
98 
99  void set(ipInt32 idx, ipInt32 val)
100  {
101  assert(idx >= 0 && idx < 3);
102  if (idx == 0)
103  _vertexIx0 = val;
104  else if (idx == 1)
105  _vertexIx1 = val;
106  else if (idx == 2)
107  _vertexIx2 = val;
108  }
109 
110 };
111 
112 
113 
115 typedef std::vector<Mesh3dHalfEdge> Mesh3dHalfEdgeColl;
117 typedef std::vector<TriVertexIx> TriVertexIxColl;
118 
121 
122 } // end of namespace geom
123 } // end of namespace ipsdk
124 
125 #endif // __IPSDKGEOMETRY_MESH3DTYPES_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
ipInt32 _vertexIx0
index of first vertex of the triangle
Definition: Mesh3dTypes.h:73
std::vector< Mesh3dHalfEdge > Mesh3dHalfEdgeColl
collection of half edges information associated to mesh 3d objects
Definition: Mesh3dTypes.h:116
int32_t ipInt32
Base types definition.
Definition: BaseTypes.h:52
Definition: Mesh3dTypes.h:52
Exterior mesh with clock wise point ordering.
Definition: Mesh3dTypes.h:37
ipUInt64 _oppositeHalfEdgeIdx
Definition: Mesh3dTypes.h:62
ipUInt64 _startVertexIdx
index of start vertex for half edge
Definition: Mesh3dTypes.h:55
ipInt32 _vertexIx2
index of the third vertex of the triangle
Definition: Mesh3dTypes.h:79
Predefined base collection types for library.
Structure that allows to get the vertices indices of one triangle.
Definition: Mesh3dTypes.h:69
Interior mesh with counter clock wise point ordering.
Definition: Mesh3dTypes.h:39
ipUInt64 _nextHalfEdgeIdx
index of next half edge inside left triangle
Definition: Mesh3dTypes.h:65
ipInt32 _vertexIx1
index of the second vertex of the triangle
Definition: Mesh3dTypes.h:76
ipUInt64 _leftTriangleIdx
index of left triangle for half edge
Definition: Mesh3dTypes.h:58
eMesh3dType
Enumerate describing mesh type.
Definition: Mesh3dTypes.h:35
Predefined macros for enumerates management.
#define IPSDK_ENUM(enumTypeStr, enumSeq)
macro allowing to declare an enumerate for library
Definition: EnumMacros.h:26