17 #ifndef __IPSDKGEOMETRY_BOUNDINGBOX3D_H__ 18 #define __IPSDKGEOMETRY_BOUNDINGBOX3D_H__ 22 #pragma warning (push) 23 #pragma warning (disable : 4251) 25 #include <IPSDKGeometry/Entity/3d/BaseTypedGeometryEntity3d.h> 26 #include <IPSDKGeometry/Entity/3d/Point/Point3d.h> 56 BoundingBox3d(
const T xMin,
const T yMin,
const T zMin,
const T xMax,
const T yMax,
const T zMax);
72 inline void setCoords(
const T xMin,
const T yMin,
const T zMin,
const T xMax,
const T yMax,
const T zMax);
73 inline void setXMin(
const T xMin);
74 inline void setXMax(
const T xMax);
75 inline void setYMin(
const T yMin);
76 inline void setYMax(
const T yMax);
77 inline void setZMin(
const T zMin);
78 inline void setZMax(
const T zMax);
80 inline void setMinCornerPt(
const Point3d<T>& minCornerPt);
82 inline void setMaxCornerPt(
const Point3d<T>& maxCornerPt);
83 inline T getXMin()
const;
84 inline T getXMax()
const;
85 inline T getYMin()
const;
86 inline T getYMax()
const;
87 inline T getZMin()
const;
88 inline T getZMax()
const;
103 inline T sizeX()
const;
104 inline T sizeY()
const;
105 inline T sizeZ()
const;
128 template <
typename T>
132 return g_coordinateSystem3dType;
135 template <
typename T>
139 return g_entity3dType;
142 template <
typename T>
146 _minCornerPt = minCornerPt;
147 _maxCornerPt = maxCornerPt;
150 template <
typename T>
158 template <
typename T>
162 _minCornerPt.setCoords(xMin, yMin, zMin);
163 _maxCornerPt.setCoords(xMax, yMax, zMax);
166 template <
typename T>
170 _minCornerPt._x = xMin;
173 template <
typename T>
177 _maxCornerPt._x = xMax;
180 template <
typename T>
184 _minCornerPt._y = yMin;
187 template <
typename T>
191 _maxCornerPt._y = yMax;
194 template <
typename T>
198 _minCornerPt._z = zMin;
201 template <
typename T>
205 _maxCornerPt._z = zMax;
208 template <
typename T>
212 _minCornerPt = minCornerPt;
215 template <
typename T>
222 template <
typename T>
226 _maxCornerPt = maxCornerPt;
229 template <
typename T>
236 template <
typename T>
240 return _minCornerPt._x;
243 template <
typename T>
247 return _maxCornerPt._x;
250 template <
typename T>
254 return _minCornerPt._y;
257 template <
typename T>
261 return _maxCornerPt._y;
264 template <
typename T>
268 return _minCornerPt._z;
271 template <
typename T>
275 return _maxCornerPt._z;
278 template <
typename T>
282 return _minCornerPt._x;
285 template <
typename T>
289 return _maxCornerPt._x;
292 template <
typename T>
296 return _minCornerPt._y;
299 template <
typename T>
303 return _maxCornerPt._y;
306 template <
typename T>
310 return _minCornerPt._z;
313 template <
typename T>
317 return _maxCornerPt._z;
320 template <
typename T>
327 template <
typename T>
334 template <
typename T>
341 template <
typename T>
348 template <
typename T>
352 return _maxCornerPt._x - _minCornerPt._x;
355 template <
typename T>
359 return _maxCornerPt._y - _minCornerPt._y;
362 template <
typename T>
366 return _maxCornerPt._z - _minCornerPt._z;
369 template <
typename T>
373 return (_maxCornerPt._x + _minCornerPt._x) / 2.0;
376 template <
typename T>
380 return (_maxCornerPt._y + _minCornerPt._y) / 2.0;
383 template <
typename T>
387 return (_maxCornerPt._z + _minCornerPt._z) / 2.0;
390 template <
typename T>
403 #pragma warning (pop) 405 #endif // __IPSDKGEOMETRY_BOUNDINGBOX3D_H__ Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
eEntity3dType getEntity3dType() const
method allowing to retrieve entity 3d type
Definition: BoundingBox3d.h:137
eCoordinateSystem3dType
Enumerate describing coordinate system 3d type.
Definition: GeometryEntity3dTypes.h:74
void setYMin(const T yMin)
access to point coordinates
Definition: BoundingBox3d.h:182
Point class associated to cartesian 3d coordinates.
Definition: GeometryEntity3dTypes.h:29
#define IPSDK_DECLARE_GEOMETRY_ENTITY_3D(libraryName, className)
Macro allowing to declare a geometry entity 3d.
Definition: GeometryEntity3dHdrMacros.h:131
void setZMin(const T zMin)
access to point coordinates
Definition: BoundingBox3d.h:196
void setMaxCornerPt(const Point3dData< T > &maxCornerPt)
access to point coordinates
Definition: BoundingBox3d.h:224
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
void setXMax(const T xMax)
access to point coordinates
Definition: BoundingBox3d.h:175
Utility functions for bounding box 3d management.
const Point3dData< T > & getCoords() const
access to point coordinates
Definition: Point3d.h:142
T getYMax() const
access to point coordinates
Definition: BoundingBox3d.h:259
Point3dData< T > _maxCornerPt
maximum coordinates point associated to bounding box
Definition: BoundingBox3d.h:122
void setMinCornerPt(const Point3dData< T > &minCornerPt)
access to point coordinates
Definition: BoundingBox3d.h:210
const Point3dData< T > & getMaxCornerPt() const
access to point coordinates
Definition: BoundingBox3d.h:329
T getZMax() const
access to point coordinates
Definition: BoundingBox3d.h:273
void setXMin(const T xMin)
access to point coordinates
Definition: BoundingBox3d.h:168
T sizeZ() const
compute bounding box dimensions
Definition: BoundingBox3d.h:364
#define IPSDKGEOMETRY_API
Import/Export macro for library IPSDKGeometry.
Definition: IPSDKGeometryExports.h:25
void setYMax(const T yMax)
access to point coordinates
Definition: BoundingBox3d.h:189
Rectangular 3d bounding box class associated to cartesian 3d coordinates.
Definition: BoundingBox3d.h:37
T getXMax() const
access to point coordinates
Definition: BoundingBox3d.h:245
T getZMin() const
access to point coordinates
Definition: BoundingBox3d.h:266
ipReal64 centerZ() const
compute bounding box center point
Definition: BoundingBox3d.h:385
T sizeY() const
compute bounding box dimensions
Definition: BoundingBox3d.h:357
Point3dData< ipReal64 > center() const
compute bounding box center point
Definition: BoundingBox3d.h:392
Point3dData< T > _minCornerPt
minimum coordinates point associated to bounding box
Definition: BoundingBox3d.h:119
eEntity3dType
Enumerate describing entity 3d type.
Definition: GeometryEntity3dTypes.h:38
ipReal64 centerY() const
compute bounding box center point
Definition: BoundingBox3d.h:378
eCoordinateSystem3dType getCoordinateSystem3dType() const
method allowing to retrieve coordinate system 3d type
Definition: BoundingBox3d.h:130
ipReal64 centerX() const
compute bounding box center point
Definition: BoundingBox3d.h:371
Base class for typed 3d geometry entities.
Definition: BaseTypedGeometryEntity3d.h:27
Cartesian coordinate system.
Definition: GeometryEntity3dTypes.h:76
T sizeX() const
compute bounding box dimensions
Definition: BoundingBox3d.h:350
T getXMin() const
access to point coordinates
Definition: BoundingBox3d.h:238
Lightweight structure used to store Point3d data.
Definition: GeometryEntity3dTypes.h:27
T getYMin() const
access to point coordinates
Definition: BoundingBox3d.h:252
void setZMax(const T zMax)
access to point coordinates
Definition: BoundingBox3d.h:203
Basic operators used for bounding box 3d management.
BoundingBox.
Definition: GeometryEntity3dTypes.h:44
const Point3dData< T > & getMinCornerPt() const
access to point coordinates
Definition: BoundingBox3d.h:322
void setCoords(const Point3dData< T > &minCornerPt, const Point3dData< T > &maxCornerPt)
access to point coordinates
Definition: BoundingBox3d.h:144