25 #ifndef _SpExtents_h_Included_
26 #define _SpExtents_h_Included_
76 if ( planar ==
false )
77 return !isDisjoint( extents,
tol );
80 return !( extents.
minPoint().
x > (maxPoint().x +
tol.equalPoint())
81 || extents.
minPoint().
y > (maxPoint().y +
tol.equalPoint())
82 || minPoint().x > (extents.
maxPoint().
x +
tol.equalPoint())
83 || minPoint().y > (extents.
maxPoint().
y +
tol.equalPoint()));
115 if ( m_min[dimension] > (coordinate +
tol) )
return right;
116 if ( m_max[dimension] < (coordinate -
tol) )
return left;
128 m_max[dimension] = ( m_min[dimension] + m_max[dimension]) / 2;
130 m_min[dimension] = ( m_min[dimension] + m_max[dimension]) / 2;
141 m_max[dimension] += ( m_max[dimension] - m_min[dimension] );
143 m_min[dimension] -= ( m_max[dimension] - m_min[dimension] );
151 if ( m_min.isEqualTo( m_max ) )
return;
152 double ext =
odmax( m_max.x - m_min.x, m_max.y - m_min.y );
153 if ( !planar ) ext =
odmax( m_max.z - m_min.z, ext );
154 m_max.x = m_min.x + ext;
155 m_max.y = m_min.y + ext;
156 if ( !planar ) m_max.z = m_min.z + ext;
const OdGePoint3d & maxPoint() const
bool contains(const OdGePoint3d &point, const OdGeTol &tol=OdGeContext::gTol) const
const OdGePoint3d & minPoint() const
void makeHalf(int dimension, bool moveRight)
virtual bool intersects(const OdGeExtents3d &extents, bool planar=false, const OdGeTol &tol=OdGeContext::gTol) const
IntersectResult intersects(double coordinate, int dimension, double tol=OdGeContext::gTol.equalPoint()) const
Extent3d(const OdGePoint3d &min, const OdGePoint3d &max)
virtual bool contains(const OdGeExtents3d &extents, bool planar=false, const OdGeTol &tol=OdGeContext::gTol) const
void makeCube(bool planar)
Extent3d(const OdGeExtents2d &source)
Extent3d(const OdGeExtents3d &source)
void makeDouble(int dimension, bool moveRight)
GLsizei GLsizei GLchar * source
const T & min(const T &x, const T &y)
const T & max(const T &x, const T &y)
static GE_STATIC_EXPORT OdGeTol gTol