17 #ifndef __IPSDKGEOMETRY_BOUNDINGBOX2D_H__ 18 #define __IPSDKGEOMETRY_BOUNDINGBOX2D_H__ 22 #pragma warning (push) 23 #pragma warning (disable : 4251) 25 #include <IPSDKGeometry/Entity/2d/BaseTypedGeometryEntity2d.h> 26 #include <IPSDKGeometry/Entity/2d/Point/Point2d.h> 59 BoundingBox2d(
const T xMin,
const T yMin,
const T xMax,
const T yMax);
75 inline void setCoords(
const T xMin,
const T yMin,
const T xMax,
const T yMax);
76 inline void setXMin(
const T xMin);
77 inline void setXMax(
const T xMax);
78 inline void setYMin(
const T yMin);
79 inline void setYMax(
const T yMax);
81 inline void setMinCornerPt(
const Point2d<T>& minCornerPt);
83 inline void setMaxCornerPt(
const Point2d<T>& maxCornerPt);
84 inline T getXMin()
const;
85 inline T getXMax()
const;
86 inline T getYMin()
const;
87 inline T getYMax()
const;
100 inline T sizeX()
const;
101 inline T sizeY()
const;
102 inline T getArea()
const;
124 template <
typename T>
128 return g_coordinateSystem2dType;
131 template <
typename T>
135 return g_entity2dType;
138 template <
typename T>
142 _minCornerPt = minCornerPt;
143 _maxCornerPt = maxCornerPt;
146 template <
typename T>
154 template <
typename T>
158 _minCornerPt.setCoords(xMin, yMin);
159 _maxCornerPt.setCoords(xMax, yMax);
162 template <
typename T>
166 _minCornerPt._x = xMin;
169 template <
typename T>
173 _maxCornerPt._x = xMax;
176 template <
typename T>
180 _minCornerPt._y = yMin;
183 template <
typename T>
187 _maxCornerPt._y = yMax;
190 template <
typename T>
194 _minCornerPt = minCornerPt;
197 template <
typename T>
204 template <
typename T>
208 _maxCornerPt = maxCornerPt;
211 template <
typename T>
218 template <
typename T>
222 return _minCornerPt._x;
225 template <
typename T>
229 return _maxCornerPt._x;
232 template <
typename T>
236 return _minCornerPt._y;
239 template <
typename T>
243 return _maxCornerPt._y;
246 template <
typename T>
250 return _minCornerPt._x;
253 template <
typename T>
257 return _maxCornerPt._x;
260 template <
typename T>
264 return _minCornerPt._y;
267 template <
typename T>
271 return _maxCornerPt._y;
274 template <
typename T>
281 template <
typename T>
288 template <
typename T>
295 template <
typename T>
302 template <
typename T>
306 return _maxCornerPt._x - _minCornerPt._x;
309 template <
typename T>
313 return _maxCornerPt._y - _minCornerPt._y;
316 template <
typename T>
320 return this->sizeX() * this->sizeY();
323 template <
typename T>
327 return (_maxCornerPt._x + _minCornerPt._x) / 2.0;
330 template <
typename T>
334 return (_maxCornerPt._y + _minCornerPt._y) / 2.0;
337 template <
typename T>
350 #pragma warning (pop) 352 #endif // __IPSDKGEOMETRY_BOUNDINGBOX2D_H__ Point2dData< T > _minCornerPt
minimum coordinates point associated to bounding box
Definition: BoundingBox2d.h:115
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Point class associated to cartesian 2d coordinates.
Definition: GeometryEntity2dTypes.h:28
const Point2dData< T > & getMaxCornerPt() const
access to bounding box coordinates
Definition: BoundingBox2d.h:283
eEntity2dType getEntity2dType() const
method allowing to retrieve entity 2d type
Definition: BoundingBox2d.h:133
void setYMax(const T yMax)
access to bounding box coordinates
Definition: BoundingBox2d.h:185
const Point2dData< T > & getMinCornerPt() const
access to bounding box coordinates
Definition: BoundingBox2d.h:276
T getArea() const
compute bounding box dimensions
Definition: BoundingBox2d.h:318
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
T getXMin() const
access to bounding box coordinates
Definition: BoundingBox2d.h:220
T sizeY() const
compute bounding box dimensions
Definition: BoundingBox2d.h:311
ipReal64 centerX() const
compute bounding box center point
Definition: BoundingBox2d.h:325
void setYMin(const T yMin)
access to bounding box coordinates
Definition: BoundingBox2d.h:178
eCoordinateSystem2dType
Enumerate describing coordinate system 2d type.
Definition: GeometryEntity2dTypes.h:76
T getYMax() const
access to bounding box coordinates
Definition: BoundingBox2d.h:241
#define IPSDKGEOMETRY_API
Import/Export macro for library IPSDKGeometry.
Definition: IPSDKGeometryExports.h:25
BoundingBox.
Definition: GeometryEntity2dTypes.h:44
Base class for typed 3d geometry entities.
Definition: BaseTypedGeometryEntity2d.h:27
Point2dData< T > PointType
point type associated to object
Definition: BoundingBox2d.h:51
#define IPSDK_DECLARE_GEOMETRY_ENTITY_2D(libraryName, className)
Macro allowing to declare a geometry entity 2d.
Definition: GeometryEntity2dHdrMacros.h:131
eCoordinateSystem2dType getCoordinateSystem2dType() const
method allowing to retrieve coordinate system 2d type
Definition: BoundingBox2d.h:126
void setXMax(const T xMax)
access to bounding box coordinates
Definition: BoundingBox2d.h:171
void setCoords(const Point2dData< T > &minCornerPt, const Point2dData< T > &maxCornerPt)
access to bounding box coordinates
Definition: BoundingBox2d.h:140
Point2dData< ipReal64 > center() const
compute bounding box center point
Definition: BoundingBox2d.h:339
const Point2dData< T > & getCoords() const
access to point coordinates
Definition: Point2d.h:139
eEntity2dType
Enumerate describing entity 2d type.
Definition: GeometryEntity2dTypes.h:38
T sizeX() const
compute bounding box dimensions
Definition: BoundingBox2d.h:304
T getYMin() const
access to bounding box coordinates
Definition: BoundingBox2d.h:234
void setMinCornerPt(const Point2dData< T > &minCornerPt)
access to bounding box coordinates
Definition: BoundingBox2d.h:192
ipReal64 centerY() const
compute bounding box center point
Definition: BoundingBox2d.h:332
void setXMin(const T xMin)
access to bounding box coordinates
Definition: BoundingBox2d.h:164
Point2dData< T > _maxCornerPt
maximum coordinates point associated to bounding box
Definition: BoundingBox2d.h:118
Lightweight structure used to store Point2d data.
Definition: GeometryEntity2dTypes.h:26
T getXMax() const
access to bounding box coordinates
Definition: BoundingBox2d.h:227
Rectangular 2d bounding box class associated to cartesian 2d coordinates.
Definition: BoundingBox2d.h:37
Utility functions for bounding box 2d management.
void setMaxCornerPt(const Point2dData< T > &maxCornerPt)
access to bounding box coordinates
Definition: BoundingBox2d.h:206
Cartesian coordinate system.
Definition: GeometryEntity2dTypes.h:78
Basic operators used for bounding box 2d management.