24 #ifndef _ODGEEXTENTS2D_INCLUDED_
25 #define _ODGEEXTENTS2D_INCLUDED_
33 #define INVALIDEXTENTS 1.0e20
85 { m_min =
min; m_max =
max; }
110 if ( !isValidExtents() )
112 m_max = m_min = point;
116 m_max.
x =
odmax (point.
x, m_max.x);
117 m_max.y =
odmax (point.
y, m_max.y);
118 m_min.x =
odmin (point.
x, m_min.x);
119 m_min.y =
odmin (point.
y, m_min.y);
147 return ( (m_max.x >= m_min.x) && (m_max.y >= m_min.y) );
157 if (isValidExtents ())
178 if (isValidExtents ())
180 m_max = m_min = (xfm * m_min);
181 expandBy (xfm * vecX);
182 expandBy (xfm * vecY);
195 return ( point.
x >= m_min.x && point.
y >= m_min.y &&
196 point.
x <= m_max.x && point.
y <= m_max.y );
202 return (extents.
m_min.
x >= m_min.x && extents.
m_min.
y >= m_min.y &&
203 m_max.x >= extents.
m_max.
x && m_max.y >= extents.
m_max.
y );
216 return (extents.
m_min.
x > m_max.x || extents.
m_min.
y > m_max.y ||
217 m_min.x > extents.
m_max.
x || m_min.y > extents.
m_max.
y );
253 return m_min + (m_max - m_min) * 0.5;
260 return isEqualTo(extents);
264 return !isEqualTo(extents);
311 #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
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
const T & min(const T &x, const T &y)
const T & max(const T &x, const T &y)
bool DAI_EXPORT operator!=(const OdDAI::OdSelect &left, const OdDAI::OdSelect &right)
bool DAI_EXPORT operator==(const OdFileDescriptionAuto &left, const OdFileDescriptionAuto &right)
static GE_STATIC_EXPORT OdGeTol gTol