CFx SDK Documentation
2020SP3
|
Go to the documentation of this file.
24 #ifndef _ODGEEXTENTS2D_INCLUDED_
25 #define _ODGEEXTENTS2D_INCLUDED_
27 #include "Ge/GePoint2d.h"
33 #define INVALIDEXTENTS 1.0e20
42 class GE_TOOLKIT_EXPORT OdGeExtents2d
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
315 #endif //_ODGEEXTENTS2D_INCLUDED_
static GE_STATIC_EXPORT const OdGeExtents2d kInvalid
OdGeExtents2d(const OdGePoint2d &min, const OdGePoint2d &max)
void set(const OdGePoint2d &min, const OdGePoint2d &max)
static GE_STATIC_EXPORT const OdGeVector2d kYAxis
bool isEqualTo(const OdGeExtents2d &extents, const OdGeTol &tol=OdGeContext::gTol) const
void addPoint(const OdGePoint2d &point)
const T & min(const T &x, const T &y)
void expandBy(const OdGeVector2d &vect)
bool DAI_EXPORT operator!=(const OdDAI::OdSelect &left, const OdDAI::OdSelect &right)
IntersectionStatus intersectWith(const OdGeExtents2d &extents, OdGeExtents2d *pResult=0) const
void transformBy(const OdGeMatrix2d &xfm)
const OdGePoint2d & minPoint() const
OdGePoint2d center() const
const T & max(const T &x, const T &y)
bool contains(const OdGeExtents2d &extents) const
bool contains(const OdGePoint2d &point) const
bool isEqualTo(const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
const OdGePoint2d & maxPoint() const
static GE_STATIC_EXPORT OdGeTol gTol
bool DAI_EXPORT operator==(const OdFileDescriptionAuto &left, const OdFileDescriptionAuto &right)
void addExt(const OdGeExtents2d &extents)
static GE_STATIC_EXPORT const OdGeVector2d kXAxis
bool isDisjoint(const OdGeExtents2d &extents) const
void comparingSet(const OdGePoint2d &pt1, const OdGePoint2d &pt2)
bool isValidExtents() const