24#ifndef _ODGEEXTENTS2D_INCLUDED_
25#define _ODGEEXTENTS2D_INCLUDED_
34#define INVALIDEXTENTS 1.0e20
98 {
return m_max - m_min; }
110 m_min = min; m_max = max;
140 if (!isValidExtents())
142 m_max = m_min = point;
146 m_max.
x =
odmax (point.
x, m_max.x);
147 m_max.y =
odmax (point.
y, m_max.y);
148 m_min.x =
odmin (point.
x, m_min.x);
149 m_min.y =
odmin (point.
y, m_min.y);
195 return ((m_max.x >= m_min.x) && (m_max.y >= m_min.y));
315 return OdGePoint2d(0.5 * (m_min.x + m_max.x), 0.5 * (m_min.y + m_max.y));
342 return isEqualTo(extents);
355 return !isEqualTo(extents);
378 return ( (point.
x +
tol.equalPoint()) >=
m_min.
x
455 if (
value < minValue)
462 if (
value > maxValue)
#define GE_TOOLKIT_EXPORT
bool isBoxContainsPoint(const OdGePoint2d &minPt, const OdGePoint2d &maxPt, const OdGePoint2d &pt, const OdGeTol &tol=OdGeContext::gTol)
bool extendExtents(double &minValue, double &maxValue, const double &value)
void pointsExtents(OdGePoint2d &minPt, OdGePoint2d &maxPt, const OdGePoint2d &pt1, const OdGePoint2d &pt2)
bool operator!=(T left, const OdGiVariant::EnumType right)
bool operator==(T left, const OdGiVariant::EnumType right)
bool OdLessOrEqual(double x, double y, double tol=1.e-10)
bool OdGreaterOrEqual(double x, double y, double tol=1.e-10)
OdGeExtents2d & addPoint(const OdGePoint2d &point)
bool isEqualTo(const OdGeExtents2d &extents, const OdGeTol &tol=OdGeContext::gTol) const
void set(const OdGePoint2d &min, const OdGePoint2d &max)
void transformBy(const OdGeMatrix2d &xfm)
IntersectionStatus intersectWith(const OdGeExtents2d &extents, OdGeExtents2d *pResult=0) const
OdGePoint2d center() const
OdGeExtents2d & addExt(const OdGeExtents2d &extents)
void comparingSet(const OdGePoint2d &pt1, const OdGePoint2d &pt2)
bool contains(const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
void translate(const OdGeVector2d &iShift)
bool isValidExtents() const
bool isDisjoint(const OdGeExtents2d &extents, const OdGeTol &tol=OdGeContext::gTol) const
const OdGePoint2d & maxPoint() const
const OdGePoint2d & minPoint() const
OdGeExtents2d(const OdGePoint2d &min, const OdGePoint2d &max)
void expandBy(const OdGeVector2d &vect)
static GE_STATIC_EXPORT const OdGeExtents2d kInvalid
OdGeVector2d diagonal() const
OdGeExtents2d & addPoints(const OdGePoint2dArray &points)
GLsizei const GLfloat * value
static GE_STATIC_EXPORT OdGeTol gTol