24 #ifndef _ODGEEXTENTS2D_INCLUDED_
25 #define _ODGEEXTENTS2D_INCLUDED_
34 #define INVALIDEXTENTS 1.0e20
86 { m_min =
min; m_max =
max; }
111 if ( !isValidExtents() )
113 m_max = m_min = point;
117 m_max.
x =
odmax (point.
x, m_max.x);
118 m_max.y =
odmax (point.
y, m_max.y);
119 m_min.x =
odmin (point.
x, m_min.x);
120 m_min.y =
odmin (point.
y, m_min.y);
148 return ( (m_max.x >= m_min.x) && (m_max.y >= m_min.y) );
158 if (isValidExtents ())
179 if (isValidExtents ())
181 m_max = m_min = (xfm * m_min);
182 expandBy (xfm * vecX);
183 expandBy (xfm * vecY);
196 return ( point.
x >= m_min.x && point.
y >= m_min.y &&
197 point.
x <= m_max.x && point.
y <= m_max.y );
203 return (extents.
m_min.
x >= m_min.x && extents.
m_min.
y >= m_min.y &&
204 m_max.x >= extents.
m_max.
x && m_max.y >= extents.
m_max.
y );
217 return (extents.
m_min.
x > m_max.x || extents.
m_min.
y > m_max.y ||
218 m_min.x > extents.
m_max.
x || m_min.y > extents.
m_max.
y );
254 return m_min + (m_max - m_min) * 0.5;
261 return isEqualTo(extents);
265 return !isEqualTo(extents);
316 #undef INVALIDEXTENTS
#define GE_TOOLKIT_EXPORT
bool isEqualTo(const OdGeExtents2d &extents, const OdGeTol &tol=OdGeContext::gTol) const
void set(const OdGePoint2d &min, const OdGePoint2d &max)
void transformBy(const OdGeMatrix2d &xfm)
void addExt(const OdGeExtents2d &extents)
IntersectionStatus intersectWith(const OdGeExtents2d &extents, OdGeExtents2d *pResult=0) const
OdGePoint2d center() const
void comparingSet(const OdGePoint2d &pt1, const OdGePoint2d &pt2)
bool isDisjoint(const OdGeExtents2d &extents) const
bool contains(const OdGeExtents2d &extents) const
OdGeExtents2d & addPoints(const OdGePoint2dArray &points)
bool isValidExtents() const
const OdGePoint2d & maxPoint() const
void addPoint(const OdGePoint2d &point)
OdGeExtents2d(const OdGePoint2d &min, const OdGePoint2d &max)
void expandBy(const OdGeVector2d &vect)
static GE_STATIC_EXPORT const OdGeExtents2d kInvalid
bool contains(const OdGePoint2d &point) const
const OdGePoint2d & minPoint() const
bool isEqualTo(const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
static GE_STATIC_EXPORT const OdGeVector2d kYAxis
static GE_STATIC_EXPORT const OdGeVector2d kXAxis
bool operator==(const BlockRefPath &rA, const BlockRefPath &rB)
DOM.
bool operator!=(const BlockRefPath &rA, const BlockRefPath &rB)
DOM.
const T & min(const T &x, const T &y)
const T & max(const T &x, const T &y)
static GE_STATIC_EXPORT OdGeTol gTol