CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Classes | Macros | Functions
GeExtents2d.h File Reference
#include "Ge/GePoint2d.h"
#include "Ge/GePoint2dArray.h"
#include "Ge/GeVector2d.h"
#include "Ge/GeMatrix2d.h"
#include "TD_PackPush.h"
#include "TD_PackPop.h"

Go to the source code of this file.

Classes

class  OdGeExtents2d
 

Macros

#define _ODGEEXTENTS2D_INCLUDED_   /*!DOM*/
 
#define INVALIDEXTENTS   1.0e20
 

Functions

void pointsExtents (OdGePoint2d &minPt, OdGePoint2d &maxPt, const OdGePoint2d &pt1, const OdGePoint2d &pt2)
 
bool extendExtents (double &minValue, double &maxValue, const double &value)
 
bool extendExtents (OdGePoint2d &minPt, OdGePoint2d &maxPt, const OdGePoint2d &pt)
 
bool isBoxContainsPoint (const OdGePoint2d &minPt, const OdGePoint2d &maxPt, const OdGePoint2d &pt, const OdGeTol &tol=OdGeContext::gTol)
 

Macro Definition Documentation

◆ _ODGEEXTENTS2D_INCLUDED_

#define _ODGEEXTENTS2D_INCLUDED_   /*!DOM*/

Definition at line 25 of file GeExtents2d.h.

◆ INVALIDEXTENTS

#define INVALIDEXTENTS   1.0e20

Definition at line 34 of file GeExtents2d.h.

Function Documentation

◆ extendExtents() [1/2]

bool extendExtents ( double &  minValue,
double &  maxValue,
const double &  value 
)
inline

Updates one of the values of the extents ('minValue' or 'maxValue') if the specified 'value' is not between the minimum and maximum values.

Parameters
minValue[in/out] Receives a new minimum value if the specified 'value' is less than current 'minValue'.
maxValue[in/out] Receives a new maximum value if the specified 'value' is greater than current 'maxValue'.
value[in] Value to compare.
Remarks
'minValue' and 'maxValue' must be must be initialized. 'minValue' must be less than 'maxValue'.
Returns
true if extents were extended (new 'minValue' or 'maxValue' was received), false otherwise ('value' lied between 'minValue' and 'maxValue').

Definition at line 451 of file GeExtents2d.h.

◆ extendExtents() [2/2]

bool extendExtents ( OdGePoint2d minPt,
OdGePoint2d maxPt,
const OdGePoint2d pt 
)
inline

Extends point's coordinates of 'minPt' or/and 'maxPt' if coordinates of the 'pt' parameter are not between corresponding coordinates the minimum and maximum points. If 'pt' has one of coordinates (or both) less than 'minPt', these coordinates are assigned to 'minPt'. If 'pt' has one of coordinates (or both) greater than 'maxPt', these coordinates are assigned to 'maxPt'.

Parameters
minPt[in/out] Receives new coordinates for a minimum point.
maxPt[in/out] Receives new coordinates for a maximum point.
pt[in] Point to compare.
Remarks
'minPt' and 'maxPt' must be must be initialized.
Returns
true if coordinates of 'minPt' or/and 'maxPt' have been changed, false otherwise.

Definition at line 487 of file GeExtents2d.h.

◆ isBoxContainsPoint()

bool isBoxContainsPoint ( const OdGePoint2d minPt,
const OdGePoint2d maxPt,
const OdGePoint2d pt,
const OdGeTol tol = OdGeContext::gTol 
)
inline

Checks whether the specified point lies in the extents defined by its minimum and maximum points.

Parameters
minPt[in] Point of the extents minimum.
maxPt[in] Point of the extents maximum.
pt[in] Point to check.
tol[in] Geometric tolerance.
Returns
true if the point is placed in the extents or on its border, false otherwise.

Definition at line 507 of file GeExtents2d.h.

◆ pointsExtents()

void pointsExtents ( OdGePoint2d minPt,
OdGePoint2d maxPt,
const OdGePoint2d pt1,
const OdGePoint2d pt2 
)
inline

Updates a minimum and maximum points according to coordinates of the input points.

Parameters
minPt[out] Resulting minimum point.
maxPt[out] Resulting maximum point.
pt1[in] First point to be processed.
pt2[in] Second point to be processed.

Definition at line 412 of file GeExtents2d.h.