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

#include <GeExtents3d.h>

Inheritance diagram for OdGeExtents3d:
OdGsCullingBBox OdSi::Extent3d

Public Types

enum  IntersectionStatus {
  kIntersectUnknown , kIntersectNot , kIntersectOpIn , kIntersectOpOut ,
  kIntersectOk
}
 
enum  Convert2dPlane {
  kConvert2dPlaneXY = 0x04 , kConvert2dPlaneXZ = 0x08 , kConvert2dPlaneYX = 0x01 , kConvert2dPlaneYZ = 0x09 ,
  kConvert2dPlaneZX = 0x02 , kConvert2dPlaneZY = 0x06
}
 

Public Member Functions

 OdGeExtents3d ()
 
 OdGeExtents3d (const OdGePoint3d &min, const OdGePoint3d &max)
 
const OdGePoint3dminPoint () const
 
const OdGePoint3dmaxPoint () const
 
const OdGePoint3doperator[] (int iIndex) const
 
OdGePoint3doperator[] (int iIndex)
 
void set (const OdGePoint3d &min, const OdGePoint3d &max)
 
void comparingSet (const OdGePoint3d &pt1, const OdGePoint3d &pt2)
 
OdGeExtents3daddPoint (const OdGePoint3d &point)
 
OdGeExtents3daddPoints (const OdGePoint3dArray &points)
 
OdGeExtents3daddExt (const OdGeExtents3d &extents)
 
bool isValidExtents () const
 
void expandBy (const OdGeVector3d &vect)
 
void transformBy (const OdGeMatrix3d &xfm)
 
bool contains (const OdGePoint3d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
bool contains (const OdGeExtents3d &extents, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isDisjoint (const OdGeExtents3d &extents, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isDisjointEuclidean (const OdGeExtents3d &extents, const OdGeTol &tol=OdGeContext::gTol) const
 
double distanceTo (const OdGePoint3d &iPoint) const
 
double distanceTo (const OdGeExtents3d &iExtents) const
 
IntersectionStatus intersectWith (const OdGeExtents3d &extents, OdGeExtents3d *pResult=0) const
 
bool isWithinRange (const OdGePoint3d &pt, double radius)
 
OdGePoint3d center () const
 
OdGeVector3d diagonal () const
 
void convert2d (OdGeExtents2d &extents, Convert2dPlane plane=kConvert2dPlaneXY) const
 
void setFrom2d (const OdGeExtents2d &extents, Convert2dPlane plane=kConvert2dPlaneXY)
 
bool isEqualTo (const OdGeExtents3d &extents, const OdGeTol &tol=OdGeContext::gTol) const
 
bool operator== (const OdGeExtents3d &extents) const
 
bool operator!= (const OdGeExtents3d &extents) const
 

Static Public Attributes

static GE_STATIC_EXPORT const OdGeExtents3d kInvalid
 

Protected Attributes

OdGePoint3d m_min
 
OdGePoint3d m_max
 

Detailed Description

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

Corresponding C++ library: TD_Ge

<group OdGe_Classes>

Definition at line 44 of file GeExtents3d.h.

Member Enumeration Documentation

◆ Convert2dPlane

Types of 2D planes.

Enumerator
kConvert2dPlaneXY 

XY plane.

kConvert2dPlaneXZ 

XZ plane.

kConvert2dPlaneYX 

YX plane.

kConvert2dPlaneYZ 

YZ plane.

kConvert2dPlaneZX 

ZX plane.

kConvert2dPlaneZY 

ZY plane.

Definition at line 340 of file GeExtents3d.h.

◆ 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 267 of file GeExtents3d.h.

Constructor & Destructor Documentation

◆ OdGeExtents3d() [1/2]

OdGeExtents3d::OdGeExtents3d ( )
inline

Default constructor for the OdGeExtents3d class.

Definition at line 426 of file GeExtents3d.h.

◆ OdGeExtents3d() [2/2]

OdGeExtents3d::OdGeExtents3d ( const OdGePoint3d min,
const OdGePoint3d max 
)
inline

Constructor for the OdGeExtents3d class.

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

Definition at line 432 of file GeExtents3d.h.

Member Function Documentation

◆ addExt()

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

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

Parameters
extents[in] Array of 3D points that are added to these extents.
Returns
Reference to this OdGeExtents3d object.

Definition at line 486 of file GeExtents3d.h.

◆ addPoint()

OdGeExtents3d & OdGeExtents3d::addPoint ( const OdGePoint3d point)
inline

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

Parameters
point[in] Any 3D point.

Definition at line 467 of file GeExtents3d.h.

◆ addPoints()

OdGeExtents3d & OdGeExtents3d::addPoints ( const OdGePoint3dArray points)

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

Parameters
points[in] Array of 3D points that are added to extents.
Returns
Reference to this OdGeExtents3d object.

◆ center()

OdGePoint3d OdGeExtents3d::center ( ) const
inline

Returns a center point of this OdGeExtents3d object.

Returns
Center point as OdGePoint3d.

Definition at line 321 of file GeExtents3d.h.

◆ comparingSet()

void OdGeExtents3d::comparingSet ( const OdGePoint3d pt1,
const OdGePoint3d pt2 
)
inline

Sets the minimum and maximum points for this OdGeExtents3d 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 457 of file GeExtents3d.h.

◆ contains() [1/2]

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

Checks whether if this OdGeExtents3d object contains the specified extents.

Parameters
extents[in] 3D extents that are tested to be within these extents.
tol[in] Geometric tolerance.
Returns
true if and only if this OdGeExtents3d object contains valid extents.

Definition at line 533 of file GeExtents3d.h.

◆ contains() [2/2]

bool OdGeExtents3d::contains ( const OdGePoint3d point,
const OdGeTol tol = OdGeContext::gTol 
) const
inline

Checks whether this OdGeExtents3d object contains the specified point.

Parameters
point[in] A 3D point that is presumably contained inside these extents.
tol[in] Geometric tolerance.
Returns
true if and only if this OdGeExtents3d object contains valid extents.

Definition at line 521 of file GeExtents3d.h.

◆ convert2d()

void OdGeExtents3d::convert2d ( OdGeExtents2d extents,
Convert2dPlane  plane = kConvert2dPlaneXY 
) const

Converts this OdGeExtents3d object to a OdGeExtents2d object.

Parameters
extents[out] Resulting converted 2D extents object.
plane[in] Plane according to which conversion is calculated.
Remarks
This method sets minimum and maximum 2D points of this OdGeExtents3d object, eliminating one of the axes.

◆ diagonal()

OdGeVector3d OdGeExtents3d::diagonal ( ) const
inline

Returns the vector from minimum to maximum point.

Returns
Vector from minimal to maximal point.

Definition at line 332 of file GeExtents3d.h.

◆ distanceTo() [1/2]

double OdGeExtents3d::distanceTo ( const OdGeExtents3d iExtents) const

Calculates distance to the specified extents.

Parameters
iExtents[in] GeExtents3d to find distance to.
Returns
0.0 if extents intersect or euclidean distance otherwise.

◆ distanceTo() [2/2]

double OdGeExtents3d::distanceTo ( const OdGePoint3d iPoint) const

Calculates distance to the specified point.

Parameters
iPoint[in] Point to find distance to.
Returns
0.0 if point is inside the box or euclidean distance otherwise.

◆ expandBy()

void OdGeExtents3d::expandBy ( const OdGeVector3d vect)
inline

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

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

Definition at line 512 of file GeExtents3d.h.

◆ intersectWith()

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

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

Parameters
extents[in] Any 3D 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 Extents object is completely within this one kIntersectOpOut This OdGeExtents3d object is completely within the specified one kIntersectOk The extents boxes are intersecting, and a result is returned

◆ isDisjoint()

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

Checks whether the specified extents do not intersect these extents.

Parameters
extents[in] Any 3D Extents object.
tol[in] Geometric tolerance.
Returns
true if and only if specified OdGeExtents3d object does not intersect this one.

Definition at line 545 of file GeExtents3d.h.

◆ isDisjointEuclidean()

bool OdGeExtents3d::isDisjointEuclidean ( const OdGeExtents3d extents,
const OdGeTol tol = OdGeContext::gTol 
) const

Checks whether the specified extents do not intersect these extents.

Parameters
extents[in] Any 3D Extents object.
tol[in] Geometric tolerance.
Returns
true if and only if specified OdGeExtents3d object does not intersect this one.
Remarks
This method is the same as isDisjoint, but checks precisely whether minimal Euclidean distance is greater than tolerance.

◆ isEqualTo()

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

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

Parameters
extents[in] 3D extents to be compared 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, it returns false.

◆ isValidExtents()

bool OdGeExtents3d::isValidExtents ( ) const
inline

Checks whether this OdGeExtents3d 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 OdGeExtents3d object contains valid extents.

Definition at line 172 of file GeExtents3d.h.

◆ isWithinRange()

bool OdGeExtents3d::isWithinRange ( const OdGePoint3d pt,
double  radius 
)

Checks whether the box intersects the sphere with specified center and radius.

Parameters
pt[in] A 3D point that represents the sphere center.
radius[in] A radius of the sphere.
Returns
true if and only if the box intersects the sphere with specified center and radius.

◆ maxPoint()

const OdGePoint3d & OdGeExtents3d::maxPoint ( ) const
inline

Returns the maximum point of this OdGeExtents3d object.

Returns
Reference to maximum point of these extents.

Definition at line 443 of file GeExtents3d.h.

◆ minPoint()

const OdGePoint3d & OdGeExtents3d::minPoint ( ) const
inline

Returns the minimum point of this OdGeExtents3d object.

Returns
Reference to minimum point of these extents.

Definition at line 438 of file GeExtents3d.h.

◆ operator!=()

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

Comparison operator for the OdGeExtents3d object.

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

Definition at line 413 of file GeExtents3d.h.

◆ operator==()

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

Comparison operator for the OdGeExtents3d object.

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

Definition at line 400 of file GeExtents3d.h.

◆ operator[]() [1/2]

OdGePoint3d & OdGeExtents3d::operator[] ( int  iIndex)
inline

Returns the reference to the vertex of the box depending on index.

Parameters
iIndex[in] Index of the vertex to return.
Returns
Reference to the minimum vertex when iIndex = 0, reference to the maximum vertex otherwise.

Definition at line 102 of file GeExtents3d.h.

◆ operator[]() [2/2]

const OdGePoint3d & OdGeExtents3d::operator[] ( int  iIndex) const
inline

Returns the vertex of the box depending on index.

Parameters
iIndex[in] Index of the vertex to return.
Returns
Minimum vertex when iIndex = 0, maximum vertex otherwise.

Definition at line 90 of file GeExtents3d.h.

◆ set()

void OdGeExtents3d::set ( const OdGePoint3d min,
const OdGePoint3d max 
)
inline

Sets the minimum and maximum points for this OdGeExtents3d object.

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

Definition at line 448 of file GeExtents3d.h.

◆ setFrom2d()

void OdGeExtents3d::setFrom2d ( const OdGeExtents2d extents,
Convert2dPlane  plane = kConvert2dPlaneXY 
)

Sets minimum and maximum points for this OdGeExtents3d object from a passed OdGeExtents2d object.

Parameters
extents[in] 2D extents from which conversion is calculated.
plane[in] Plane on which the OdGeExtents2d object lies.
Remarks
This method sets 0 to the coordinate on the axis that is absent in the passed OdGeExtents2d object.

◆ transformBy()

void OdGeExtents3d::transformBy ( const OdGeMatrix3d xfm)

Applies the 3D transformation matrix to the extents.

Parameters
xfm[in] 3D transformation matrix.

Member Data Documentation

◆ kInvalid

GE_STATIC_EXPORT const OdGeExtents3d OdGeExtents3d::kInvalid
static

The invalid extents.

Definition at line 65 of file GeExtents3d.h.

◆ m_max

OdGePoint3d OdGeExtents3d::m_max
protected

Definition at line 420 of file GeExtents3d.h.

◆ m_min

OdGePoint3d OdGeExtents3d::m_min
protected

Definition at line 419 of file GeExtents3d.h.


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