IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
AnisotropicScaleTransform3d.h
1 // AnisotropicScaleTransform3d.h:
3 // ------------------------------
4 //
14 
15 #ifndef __IPSDKGEOMETRY_ANISOTROPICSCALETRANSFORM3D_H__
16 #define __IPSDKGEOMETRY_ANISOTROPICSCALETRANSFORM3D_H__
17 
18 #include <IPSDKGeometry/Transform/3d/BaseGeometryTransform3d.h>
19 #include <IPSDKMath/Geometry/3d/Transform/AnisotropicScale3d.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_AnisotropicScale;
36 
40  template <typename T>
41  static Ellipsoid3d<T> anisotropicScale(const Sphere3d<T>& entity, const ipReal64 scaleX, const ipReal64 scaleY, const ipReal64 scaleZ);
42 
43 public:
48  const ipReal64 scaleY,
49  const ipReal64 scaleZ);
53 
54 // methods
55 public:
57  eTransform3dType getTransform3dType() const;
58 
61  void init(const ipReal64 scaleX,
62  const ipReal64 scaleY,
63  const ipReal64 scaleZ);
64  void init(const math::transform::AnisotropicScale3d& transform);
66 
67 protected:
70  template <typename T>
71  void processPoint(Point3dData<T>& entity) const;
72  template <typename T>
73  bool processInSitu(Point3d<T>& entity) const;
74  bool processInSitu(Vector3d& entity) const;
75  template <typename T>
76  GeometryEntity3dPtr process(const Point3d<T>& entity) const;
77  GeometryEntity3dPtr process(const Vector3d& entity) const;
78  template <typename T>
79  bool processInSitu(BoundingBox3d<T>& entity) const;
80  template <typename T>
81  GeometryEntity3dPtr process(const BoundingBox3d<T>& entity) const;
82  template <typename T>
83  bool processInSitu(PointCloud3d<T>& entity) const;
84  template <typename T>
85  GeometryEntity3dPtr process(const PointCloud3d<T>& entity) const;
86  template <typename T>
87  bool processInSitu(Mesh3d<T>& entity) const;
88  template <typename T>
89  GeometryEntity3dPtr process(const Mesh3d<T>& entity) const;
90  template <typename T>
91  bool processInSitu(MeshWithHoles3d<T>& entity) const;
92  template <typename T>
93  GeometryEntity3dPtr process(const MeshWithHoles3d<T>& entity) const;
94  bool processInSitu(Shape3d& entity) const;
95  GeometryEntity3dPtr process(const Shape3d& entity) const;
96  template <typename T>
97  bool processInSitu(Segment3d<T>& entity) const;
98  template <typename T>
99  GeometryEntity3dPtr process(const Segment3d<T>& entity) const;
100  template <typename T>
101  GeometryEntity3dPtr process(const Sphere3d<T>& entity) const;
102  template <typename T>
103  bool processInSitu(Triangle3d<T>& entity) const;
104  template <typename T>
105  GeometryEntity3dPtr process(const Triangle3d<T>& entity) const;
107 
108 // attributes
109 protected:
112 };
113 
116 
117 inline eTransform3dType
119 {
120  return g_transform3dType;
121 }
122 
123 inline void
125  const ipReal64 scaleY,
126  const ipReal64 scaleZ)
127 {
128  _transform.setParams(scaleX, scaleY, scaleZ);
129 }
130 
131 inline void
133 {
134  _transform = transform;
135 }
136 
139 
140 } // end of namespace geom
141 } // end of namespace ipsdk
142 
143 #endif // __IPSDKGEOMETRY_ANISOTROPICSCALETRANSFORM3D_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
void setParams(const ipReal64 scaleX, const ipReal64 scaleY, const ipReal64 scaleZ)
select parameters associated to transformation
Definition: AnisotropicScale3d.h:136
Point class associated to cartesian 3d coordinates.
Definition: GeometryEntity3dTypes.h:29
3d sphere associated to cartesian 3d coordinates
Definition: Sphere3d.h:36
math::transform::AnisotropicScale3d _transform
underlying transformation
Definition: AnisotropicScaleTransform3d.h:111
eTransform3dType
Enumerate describing geometry 3d transform type.
Definition: GeometryTransform3dTypes.h:33
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
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
static const eTransform3dType::domain g_transform3dType
geometry transformation type
Definition: AnisotropicScaleTransform3d.h:35
Anisotropic 3d scale transformation.
Definition: AnisotropicScaleTransform3d.h:27
Definition: AnisotropicScale3d.h:33
Closed mesh associated to a triangulated boundary.
Definition: Mesh3d.h:43
void init(const ipReal64 scaleX, const ipReal64 scaleY, const ipReal64 scaleZ)
initialization of transformation parameters
Definition: AnisotropicScaleTransform3d.h:124
Anisotropic scale.
Definition: GeometryTransform3dTypes.h:41
Unordered collection of 3d points.
Definition: PointCloud3d.h:35
Closed mesh potentially associated to interior mesh holes.
Definition: MeshWithHoles3d.h:39
eTransform3dType getTransform3dType() const
method allowing to retrieve entity 3d transformation type
Definition: AnisotropicScaleTransform3d.h:118
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
boost::shared_ptr< BaseGeometryEntity3d > GeometryEntity3dPtr
shared pointer to BaseGeometryEntity3d
Definition: GeometryEntity3dTypes.h:120