IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
TranslationTransform3d.h
1 // TranslationTransform3d.h:
3 // -------------------------
4 //
14 
15 #ifndef __IPSDKGEOMETRY_TRANSLATIONTRANSFORM3D_H__
16 #define __IPSDKGEOMETRY_TRANSLATIONTRANSFORM3D_H__
17 
18 #include <IPSDKGeometry/Transform/3d/BaseGeometryTransform3d.h>
19 #include <IPSDKGeometry/Entity/3d/Vector/Vector3d.h>
20 #include <IPSDKMath/Geometry/3d/Transform/Translation3d.h>
21 
22 namespace ipsdk {
23 namespace geom {
24 
27 
29 {
30  // declare geometry transform 3d
32 
33 // predefined public types
34 public:
36  static const eTransform3dType::domain g_transform3dType = eTransform3dType::eT3DT_Translation;
37 
38 public:
42  TranslationTransform3d(const ipReal64 xOffset, const ipReal64 yOffset, const ipReal64 zOffset);
43  TranslationTransform3d(const Vector3d& vec);
47 
48 // methods
49 public:
51  eTransform3dType getTransform3dType() const;
52 
55  void init(const ipReal64 xOffset,
56  const ipReal64 yOffset,
57  const ipReal64 zOffset);
58  void init(const Vector3d& vec);
59  void init(const math::transform::Translation3d& transform);
61 
62 protected:
65  template <typename T>
66  void processPoint(Point3dData<T>& entity) const;
67  template <typename T>
68  bool processInSitu(Point3d<T>& entity) const;
69  bool processInSitu(Vector3d& entity) const;
70  template <typename T>
71  bool processInSitu(BoundingBox3d<T>& entity) const;
72  template <typename T>
73  bool processInSitu(PointCloud3d<T>& entity) const;
74  template <typename T>
75  bool processInSitu(Sphere3d<T>& entity) const;
76  template <typename T>
77  bool processInSitu(Ellipsoid3d<T>& entity) const;
78  template <typename T>
79  bool processInSitu(Cube3d<T>& entity) const;
80  template <typename T>
81  bool processInSitu(Cuboid3d<T>& entity) const;
82  template <typename T>
83  bool processInSitu(Mesh3d<T>& entity) const;
84  template <typename T>
85  bool processInSitu(MeshWithHoles3d<T>& entity) const;
86  bool processInSitu(Shape3d& entity) const;
87  template <typename T>
88  bool processInSitu(Segment3d<T>& entity) const;
89  template <typename T>
90  bool processInSitu(Triangle3d<T>& entity) const;
92 
93 // attributes
94 protected:
97 };
98 
101 
102 inline
103 TranslationTransform3d::TranslationTransform3d(const Vector3d& vec)
104 {
105  init(vec);
106 }
107 
108 inline eTransform3dType
110 {
111  return g_transform3dType;
112 }
113 
114 inline void
116  const ipReal64 yOffset,
117  const ipReal64 zOffset)
118 {
119  _transform.setParams(xOffset, yOffset, zOffset);
120 }
121 
122 inline void
124 {
125  _transform.setParams(vec.getX(), vec.getY(), vec.getZ());
126 }
127 
128 inline void
130 {
131  _transform = transform;
132 }
133 
136 
137 } // end of namespace geom
138 } // end of namespace ipsdk
139 
140 #endif // __IPSDKGEOMETRY_TRANSLATIONTRANSFORM3D_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
eTransform3dType getTransform3dType() const
method allowing to retrieve entity 3d transformation type
Definition: TranslationTransform3d.h:109
3d sphere associated to cartesian 3d coordinates
Definition: Sphere3d.h:36
eTransform3dType
Enumerate describing geometry 3d transform type.
Definition: GeometryTransform3dTypes.h:33
void setParams(const ipReal64 tx, const ipReal64 ty, const ipReal64 tz)
select parameters associated to transformation
Definition: Translation3d.h:115
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
ipReal64 getX() const
retrieve cartesian components of vector
Definition: Vector3d.h:264
Vector class associated to spherical 3d coordinates.
Definition: Vector3d.h:32
void init(const ipReal64 xOffset, const ipReal64 yOffset, const ipReal64 zOffset)
initialization of transformation parameters
Definition: TranslationTransform3d.h:115
#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
ipReal64 getZ() const
retrieve cartesian components of vector
Definition: Vector3d.h:276
3d triangle associated to cartesian 3d coordinates
Definition: Triangle3d.h:37
Translation 3d transformation.
Definition: TranslationTransform3d.h:28
Closed mesh associated to a triangulated boundary.
Definition: Mesh3d.h:43
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
Translation.
Definition: GeometryTransform3dTypes.h:35
Lightweight structure used to store Point3d data.
Definition: GeometryEntity3dTypes.h:27
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
Transformation class allowing to manage 3d translations.
Definition: Translation3d.h:32
math::transform::Translation3d _transform
underlying transformation
Definition: TranslationTransform3d.h:96
static const eTransform3dType::domain g_transform3dType
geometry transformation type
Definition: TranslationTransform3d.h:36
ipReal64 getY() const
retrieve cartesian components of vector
Definition: Vector3d.h:270