IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
PointCloud3d.h
1 // PointCloud3d.h:
3 // ---------------
4 //
14 
15 #ifndef __IPSDKGEOMETRY_POINTCLOUD3D_H__
16 #define __IPSDKGEOMETRY_POINTCLOUD3D_H__
17 
18 // suppression warnings
19 // warning C4251: 'ipsdk::geom::PointCloud3d<T>::_pointColl' : class 'std::vector<ipsdk::geom::Point3dData<T>>' needs to have dll-interface to be used by clients of class 'ipsdk::geom::PointCloud3d<T>'
20 #pragma warning (push)
21 #pragma warning (disable : 4251)
22 
23 #include <IPSDKGeometry/Entity/3d/BaseTypedGeometryEntity3d.h>
24 #include <IPSDKGeometry/Entity/3d/Point/Point3dData.h>
26 #include <vector>
27 
28 namespace ipsdk {
29 namespace geom {
30 
33 
34 template <typename T>
36 {
37  // declare 3d geometry entity
39 
40 // predefined public types
41 public:
43  static const eCoordinateSystem3dType::domain g_coordinateSystem3dType = eCoordinateSystem3dType::eCS3DT_Cartesian;
44 
46  static const eEntity3dType::domain g_entity3dType = eEntity3dType::eE3DT_PointCloud;
47 
50 
52  typedef std::vector<PointType> PointColl;
53 
54 public:
57  PointCloud3d();
58  PointCloud3d(const PointColl& pointColl);
59  ~PointCloud3d();
61 
62 // methods
63 public:
65  inline eCoordinateSystem3dType getCoordinateSystem3dType() const;
66 
68  inline eEntity3dType getEntity3dType() const;
69 
71  inline ipUInt32 size() const;
72 
75  inline void setCollection(const PointColl& pointColl);
76  inline const PointColl& getCollection() const;
77  inline PointColl& getCollection();
79 
81  inline void clear();
82 
83 // attributes
84 protected:
87 };
88 
91 
92 template <typename T>
95 {
96  return g_coordinateSystem3dType;
97 }
98 
99 template <typename T>
100 inline eEntity3dType
102 {
103  return g_entity3dType;
104 }
105 
106 template <typename T>
107 inline ipUInt32
109 {
110  return static_cast<ipUInt32>(_pointColl.size());
111 }
112 
113 template <typename T>
114 inline void
116 {
117  _pointColl = pointColl;
118 }
119 
120 template <typename T>
121 inline const typename PointCloud3d<T>::PointColl&
123 {
124  return _pointColl;
125 }
126 
127 template <typename T>
128 inline typename PointCloud3d<T>::PointColl&
130 {
131  return _pointColl;
132 }
133 
134 template <typename T>
135 inline void
137 {
138  _pointColl.clear();
139 }
140 
143 
144 } // end of namespace geom
145 } // end of namespace ipsdk
146 
147 #pragma warning (pop)
148 
149 #endif // __IPSDKGEOMETRY_POINTCLOUD3D_H__
const PointColl & getCollection() const
access to polygon points collection
Definition: PointCloud3d.h:122
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
eCoordinateSystem3dType
Enumerate describing coordinate system 3d type.
Definition: GeometryEntity3dTypes.h:74
ipUInt32 size() const
retrieve number of polygon points
Definition: PointCloud3d.h:108
PointColl _pointColl
ordered collection of points associated to polygon
Definition: PointCloud3d.h:86
Point cloud.
Definition: GeometryEntity3dTypes.h:46
#define IPSDK_DECLARE_GEOMETRY_ENTITY_3D(libraryName, className)
Macro allowing to declare a geometry entity 3d.
Definition: GeometryEntity3dHdrMacros.h:131
void setCollection(const PointColl &pointColl)
access to polygon points collection
Definition: PointCloud3d.h:115
void clear()
clear point collection associated to polygon
Definition: PointCloud3d.h:136
Basic operators used for point cloud 3d management.
eEntity3dType getEntity3dType() const
method allowing to retrieve entity 3d type
Definition: PointCloud3d.h:101
#define IPSDKGEOMETRY_API
Import/Export macro for library IPSDKGeometry.
Definition: IPSDKGeometryExports.h:25
std::vector< PointType > PointColl
collection of points associated to polygon
Definition: PointCloud3d.h:52
eEntity3dType
Enumerate describing entity 3d type.
Definition: GeometryEntity3dTypes.h:38
eCoordinateSystem3dType getCoordinateSystem3dType() const
method allowing to retrieve coordinate system 3d type
Definition: PointCloud3d.h:94
Unordered collection of 3d points.
Definition: PointCloud3d.h:35
Base class for typed 3d geometry entities.
Definition: BaseTypedGeometryEntity3d.h:27
Cartesian coordinate system.
Definition: GeometryEntity3dTypes.h:76
Lightweight structure used to store Point3d data.
Definition: GeometryEntity3dTypes.h:27
Point3dData< T > PointType
point type associated to object
Definition: PointCloud3d.h:49
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53