IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
CentroidTransform3d.h
1 // CentroidTransform3d.h:
3 // ----------------------
4 //
15 
16 #ifndef __IPSDKGEOMETRY_CENTROIDTRANSFORM3D_H__
17 #define __IPSDKGEOMETRY_CENTROIDTRANSFORM3D_H__
18 
19 #include <IPSDKGeometry/Transform/3d/BaseGeometryTransform3d.h>
20 
21 namespace ipsdk {
22 namespace geom {
23 
26 
28 {
29  // declare geometry transform 3d
31 
32 // predefined public types
33 public:
35  static const eTransform3dType::domain g_transform3dType = eTransform3dType::eT3DT_Centroid;
36 
39 
40 public:
46 
47 // methods
48 public:
50  eTransform3dType getTransform3dType() const;
51 
53  static Point3d<ipReal64> centroid(const BaseGeometryEntity3d& entity);
54 
55 protected:
58  template <typename T>
59  GeometryEntity3dPtr process(const Point3d<T>& entity) const;
60  GeometryEntity3dPtr process(const Vector3d& entity) const;
61  template <typename T>
62  GeometryEntity3dPtr process(const BoundingBox3d<T>& entity) const;
63  template <typename T>
64  GeometryEntity3dPtr process(const PointCloud3d<T>& entity) const;
65  template <typename T>
66  GeometryEntity3dPtr process(const Sphere3d<T>& entity) const;
67  template <typename T>
68  GeometryEntity3dPtr process(const Ellipsoid3d<T>& entity) const;
69  template <typename T>
70  GeometryEntity3dPtr process(const Cube3d<T>& entity) const;
71  template <typename T>
72  GeometryEntity3dPtr process(const Cuboid3d<T>& entity) const;
73  template <typename T>
74  GeometryEntity3dPtr process(const Mesh3d<T>& entity) const;
75  template <typename T>
76  GeometryEntity3dPtr process(const MeshWithHoles3d<T>& entity) const;
77  GeometryEntity3dPtr process(const Shape3d& entity) const;
78  template <typename T>
79  GeometryEntity3dPtr process(const Segment3d<T>& entity) const;
80  template <typename T>
81  GeometryEntity3dPtr process(const Triangle3d<T>& entity) const;
83 
84 // attributes
85 protected:
86 
87 };
88 
91 
92 inline eTransform3dType
94 {
95  return g_transform3dType;
96 }
97 
100 
101 } // end of namespace geom
102 } // end of namespace ipsdk
103 
104 #endif // __IPSDKGEOMETRY_CENTROIDTRANSFORM3D_H__
3d ellipsoid associated to cartesian 3d coordinates For a non rotated ellipse, the major radius follo...
Definition: Ellipsoid3d.h:39
3d segment associated to two points
Definition: Segment3d.h:38
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Point class associated to cartesian 3d coordinates.
Definition: GeometryEntity3dTypes.h:29
3d sphere associated to cartesian 3d coordinates
Definition: Sphere3d.h:36
eTransform3dType
Enumerate describing geometry 3d transform type.
Definition: GeometryTransform3dTypes.h:33
eTransform3dType getTransform3dType() const
method allowing to retrieve entity 3d transformation type
Definition: CentroidTransform3d.h:93
Centroid computation.
Definition: GeometryTransform3dTypes.h:49
Vector class associated to spherical 3d coordinates.
Definition: Vector3d.h:32
#define IPSDK_DECLARE_GEOMETRY_TRANSFORM_3D(libraryName, className)
Macro allowing to declare a geometry transform 3d.
Definition: GeometryTransform3dHdrMacros.h:26
#define IPSDKGEOMETRY_API
Import/Export macro for library IPSDKGeometry.
Definition: IPSDKGeometryExports.h:25
Base class for geometry 3d transformations.
Definition: BaseGeometryTransform3d.h:31
Rectangular 3d bounding box class associated to cartesian 3d coordinates.
Definition: BoundingBox3d.h:37
3d triangle associated to cartesian 3d coordinates
Definition: Triangle3d.h:37
Point3d< ipReal64 > OutPointType
output point type
Definition: CentroidTransform3d.h:38
Closed mesh associated to a triangulated boundary.
Definition: Mesh3d.h:43
Computation of 3d centroid of input geometry using Bashein / Detmer algorithm strategy.
Definition: CentroidTransform3d.h:27
3d cuboid (rectangular parallelepiped) class associated to cartesian 3d coordinates ...
Definition: Cuboid3d.h:35
Unordered collection of 3d points.
Definition: PointCloud3d.h:35
Closed mesh potentially associated to interior mesh holes.
Definition: MeshWithHoles3d.h:39
Shape 3d associated to one or more closed mesh 3d.
Definition: Shape3d.h:34
3d cube class associated to cartesian 3d coordinates
Definition: Cube3d.h:35
static const eTransform3dType::domain g_transform3dType
geometry transformation type
Definition: CentroidTransform3d.h:35
boost::shared_ptr< BaseGeometryEntity3d > GeometryEntity3dPtr
shared pointer to BaseGeometryEntity3d
Definition: GeometryEntity3dTypes.h:120
Base class for 3d geometry entities.
Definition: BaseGeometryEntity3d.h:34