CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
OdGeExtents2d Class Reference

#include <GeExtents2d.h>

Public Types

enum  IntersectionStatus {
  kIntersectUnknown , kIntersectNot , kIntersectOpIn , kIntersectOpOut ,
  kIntersectOk
}
 

Public Member Functions

 OdGeExtents2d ()
 
 OdGeExtents2d (const OdGePoint2d &min, const OdGePoint2d &max)
 
const OdGePoint2dminPoint () const
 
const OdGePoint2dmaxPoint () const
 
OdGeVector2d diagonal () const
 
void set (const OdGePoint2d &min, const OdGePoint2d &max)
 
void comparingSet (const OdGePoint2d &pt1, const OdGePoint2d &pt2)
 
OdGeExtents2daddPoint (const OdGePoint2d &point)
 
OdGeExtents2daddPoints (const OdGePoint2dArray &points)
 
OdGeExtents2daddExt (const OdGeExtents2d &extents)
 
bool isValidExtents () const
 
void expandBy (const OdGeVector2d &vect)
 
void transformBy (const OdGeMatrix2d &xfm)
 
void translate (const OdGeVector2d &iShift)
 
bool contains (const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
bool contains (const OdGeExtents2d &extents, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isDisjoint (const OdGeExtents2d &extents, const OdGeTol &tol=OdGeContext::gTol) const
 
IntersectionStatus intersectWith (const OdGeExtents2d &extents, OdGeExtents2d *pResult=0) const
 
OdGePoint2d center () const
 
bool isEqualTo (const OdGeExtents2d &extents, const OdGeTol &tol=OdGeContext::gTol) const
 
bool operator== (const OdGeExtents2d &extents) const
 
bool operator!= (const OdGeExtents2d &extents) const
 

Static Public Attributes

static GE_STATIC_EXPORT const OdGeExtents2d kInvalid
 

Protected Attributes

OdGePoint2d m_min
 
OdGePoint2d m_max
 

Detailed Description

This class represents 2D bounding boxes as minimum and maximum 2d points.

Corresponding C++ library: TD_Ge

<group OdGe_Classes>

Definition at line 43 of file GeExtents2d.h.

Member Enumeration Documentation

◆ IntersectionStatus

Types of intersection results.

Enumerator
kIntersectUnknown 

Either or both extents are invalid.

kIntersectNot 

Extents are not intersecting.

kIntersectOpIn 

Operand is completely within these extents.

kIntersectOpOut 

These extents are completely within operand.

kIntersectOk 

Extents are intersecting, result is returned.

Definition at line 268 of file GeExtents2d.h.

Constructor & Destructor Documentation

◆ OdGeExtents2d() [1/2]

OdGeExtents2d::OdGeExtents2d ( )
inline

Default constructor for the OdGeExtents2d class.

Remarks
Constructs invalid (not initialized) extents.

Definition at line 53 of file GeExtents2d.h.

◆ OdGeExtents2d() [2/2]

OdGeExtents2d::OdGeExtents2d ( const OdGePoint2d min,
const OdGePoint2d max 
)
inline

Constructor for the OdGeExtents2d class.

Parameters
min[in] Minimum point.
max[in] Maximum point.

Definition at line 63 of file GeExtents2d.h.

Member Function Documentation

◆ addExt()

OdGeExtents2d & OdGeExtents2d::addExt ( const OdGeExtents2d extents)
inline

Updates the extents of this OdGeExtents2d object with the specified extents.

Parameters
extents[in] 2D extents with the points to be added.
Returns
Reference to this OdGeExtents2d object.

Definition at line 172 of file GeExtents2d.h.

◆ addPoint()

OdGeExtents2d & OdGeExtents2d::addPoint ( const OdGePoint2d point)
inline

Updates the extents of this OdGeExtents2d object with the specified point.

Parameters
point[in] A 2D point that is added to define new extents.
Returns
Reference to this OdGeExtents2d object.

Definition at line 137 of file GeExtents2d.h.

◆ addPoints()

OdGeExtents2d & OdGeExtents2d::addPoints ( const OdGePoint2dArray points)

Updates the extents of this OdGeExtents2d object with the specified array of points.

Parameters
points[in] Array of 2D points to define the extents.
Returns
Reference to this OdGeExtents2d object.

◆ center()

OdGePoint2d OdGeExtents2d::center ( ) const
inline

Returns a center point of this Extents object.

Returns
Center point as OdGePoint2d.

Definition at line 313 of file GeExtents2d.h.

◆ comparingSet()

void OdGeExtents2d::comparingSet ( const OdGePoint2d pt1,
const OdGePoint2d pt2 
)
inline

Sets the minimum and maximum points for this OdGeExtents2d object to that of the box defined by pt1 and pt2.

Parameters
pt1[in] First point that defines the extents.
pt2[in] Second point that defines the extents.
Remarks
The passed first and second points are only needed to define a box. The points themselves do not necessarily need to be minimum and maximum points. The coordinates of the passed points are compared and then set to real minimum and maximum points.

Definition at line 366 of file GeExtents2d.h.

◆ contains() [1/2]

bool OdGeExtents2d::contains ( const OdGeExtents2d extents,
const OdGeTol tol = OdGeContext::gTol 
) const
inline

Indicates whether this OdGeExtents2d object contains the specified extents.

Parameters
extents[in] 2D extents that is tested to be within these extents.
tol[in] Tolerance of measurement error.
Returns
true if the specified Extents object is completely inside these extents. Otherwise returns false.

Definition at line 384 of file GeExtents2d.h.

◆ contains() [2/2]

bool OdGeExtents2d::contains ( const OdGePoint2d point,
const OdGeTol tol = OdGeContext::gTol 
) const
inline

Indicates whether this OdGeExtents2d object contains the specified point.

Parameters
point[in] A 2D point that is presumably contained inside these extents.
tol[in] Tolerance of measurement error.
Returns
true if this OdGeExtents2d object contains the specified point. Otherwise returns false.

Definition at line 374 of file GeExtents2d.h.

◆ diagonal()

OdGeVector2d OdGeExtents2d::diagonal ( ) const
inline

Returns the vector from minimal to maximal point.

Returns
Vector from minimal to maximal point.

Definition at line 97 of file GeExtents2d.h.

◆ expandBy()

void OdGeExtents2d::expandBy ( const OdGeVector2d vect)

Updates the extents of this OdGeExtents2d object by the specified vector.

Parameters
vect[in] A 2D vector that defines where new points are located.

◆ intersectWith()

IntersectionStatus OdGeExtents2d::intersectWith ( const OdGeExtents2d extents,
OdGeExtents2d pResult = 0 
) const

Determines the intersection of the specified Extents object with this one, and returns the resulting intersection box.

Parameters
extents[in] Any 2D Extents object.
pResult[out] Receives extents of the intersection.
Remarks
pResult object should be created by the caller.
Returns
Possible return values are as follows:

@untitled table kIntersectUnknown Either or both extents boxes are invalid kIntersectNot The extents boxes are not intersecting kIntersectOpIn The specified OdGeExtents2d object is completely within this one kIntersectOpOut This OdGeExtents2d object is completely within the specified one kIntersectOk The extents boxes are intersecting, and a result is returned

◆ isDisjoint()

bool OdGeExtents2d::isDisjoint ( const OdGeExtents2d extents,
const OdGeTol tol = OdGeContext::gTol 
) const
inline

Indicates whether the specified OdGeExtents2d object intersects these extents.

Parameters
extents[in] 2D extents.
tol[in] Tolerance of measurement error.
Returns
true if and only if the specified OdGeExtents2d object does not intersect these extents. Otherwise returns false.

Definition at line 394 of file GeExtents2d.h.

◆ isEqualTo()

bool OdGeExtents2d::isEqualTo ( const OdGeExtents2d extents,
const OdGeTol tol = OdGeContext::gTol 
) const

Checks if this OdGeExtents2d object is equal to the passed extents.

Parameters
extents[in] A 2D Extents object to be tested for equality.
tol[in] Geometric tolerance.
Remarks
This method compares this object to the passed object by testing the equivalence of their definition points.
Returns
true if the points match within the range specified by tolerance, otherwise returns false.

◆ isValidExtents()

bool OdGeExtents2d::isValidExtents ( ) const
inline

Checks whether this OdGeExtents2d object contains valid extents.

Remarks
Extents are valid if and only if each member of the minimum extents is less than or equal to the corresponding member of maximum extents.
Returns
true if and only if this OdGeExtents2d object contains valid extents.

Definition at line 193 of file GeExtents2d.h.

◆ maxPoint()

const OdGePoint2d & OdGeExtents2d::maxPoint ( ) const
inline

Returns the maximum point of this OdGeExtents2d object.

Returns
Reference to OdGePoint2d representing the maximum point.

Definition at line 88 of file GeExtents2d.h.

◆ minPoint()

const OdGePoint2d & OdGeExtents2d::minPoint ( ) const
inline

Returns the minimum point of this OdGeExtents2d object.

Returns
Reference to OdGePoint2d representing the minimum point.

Definition at line 79 of file GeExtents2d.h.

◆ operator!=()

bool OdGeExtents2d::operator!= ( const OdGeExtents2d extents) const
inline

Comparison operator for the OdGeExtents2d object.

Parameters
extents[in] Extents to compare with.
Returns
A boolean value that indicates whether the input OdGeExtents2d object is not identical to these extents.

Definition at line 353 of file GeExtents2d.h.

◆ operator==()

bool OdGeExtents2d::operator== ( const OdGeExtents2d extents) const
inline

Comparison operator for the OdGeExtents2d object.

Parameters
extents[in] Extents to compare with.
Returns
A boolean value that indicates whether the input OdGeExtents2d object is identical to these extents object.

Definition at line 340 of file GeExtents2d.h.

◆ set()

void OdGeExtents2d::set ( const OdGePoint2d min,
const OdGePoint2d max 
)
inline

Sets the minimum and maximum points for this OdGeExtents2d object.

Parameters
min[in] Minimum point.
max[in] Maximum point.

Definition at line 106 of file GeExtents2d.h.

◆ transformBy()

void OdGeExtents2d::transformBy ( const OdGeMatrix2d xfm)

Applies the 2D transformation matrix to the extents.

Parameters
xfm[in] 2D transformation matrix.

◆ translate()

void OdGeExtents2d::translate ( const OdGeVector2d iShift)
inline

Applies the 2D translation to the extents.

Parameters
iShift[in] 2D translation vector.

Definition at line 219 of file GeExtents2d.h.

Member Data Documentation

◆ kInvalid

GE_STATIC_EXPORT const OdGeExtents2d OdGeExtents2d::kInvalid
static

The invalid extents.

Definition at line 71 of file GeExtents2d.h.

◆ m_max

OdGePoint2d OdGeExtents2d::m_max
protected

Definition at line 360 of file GeExtents2d.h.

◆ m_min

OdGePoint2d OdGeExtents2d::m_min
protected

Definition at line 359 of file GeExtents2d.h.


The documentation for this class was generated from the following file: