CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
OdGeUvBox Struct Reference

#include <GeUvBox.h>

Public Member Functions

 OdGeUvBox ()
 
 OdGeUvBox (const OdGeInterval &iIntervalU, const OdGeInterval &iIntervalV)
 
const OdGeIntervalu () const
 
const OdGeIntervalv () const
 
OdGeIntervalu ()
 
OdGeIntervalv ()
 
const OdGeIntervaloperator[] (int idx) const
 
OdGeIntervaloperator[] (int idx)
 
OdGeUvBoxset ()
 
OdGeUvBoxset (const OdGeInterval &iIntervalU, const OdGeInterval &iIntervalV)
 
OdGeUvBoxset (const OdGePoint2d &iLowerBound, const OdGePoint2d &iUpperBound)
 
bool contains (double uparam, double vparam) const
 
bool contains (const OdGePoint2d &uvpoint) const
 
bool isBounded () const
 
bool finiteIntersectWith (const OdGeUvBox &range, OdGeUvBox &result) const
 
OdGePoint2d lowerBound () const
 
OdGePoint2d upperBound () const
 
bool isEqualTo (const OdGeUvBox &uvbox) const
 
 operator OdGeExtents2d () const
 
OdGePoint2d eval (double ratioU, double ratioV) const
 
OdGePoint2d clamp (const OdGePoint2d &point) const
 

Public Attributes

OdGeInterval intervals [2]
 

Detailed Description

Represents a box in UV-space of a surface.

Corresponding C++ library: TD_Ge

<group !!RECORDS_tkernel_apiref>

Definition at line 39 of file GeUvBox.h.

Constructor & Destructor Documentation

◆ OdGeUvBox() [1/2]

OdGeUvBox::OdGeUvBox ( )
inline

Default constructor for the OdGeUvBox structure.

Definition at line 49 of file GeUvBox.h.

◆ OdGeUvBox() [2/2]

OdGeUvBox::OdGeUvBox ( const OdGeInterval iIntervalU,
const OdGeInterval iIntervalV 
)
inline

Constructor for the OdGeUvBox structure.

Parameters
iIntervalU[in] Parametric interval that defines bounds for U parameter.
iIntervalV[in] Parametric interval that defines bounds for V parameter.
Remarks
Constructs UV box represented by the specified parametric intervals.

Definition at line 60 of file GeUvBox.h.

Member Function Documentation

◆ clamp()

OdGePoint2d OdGeUvBox::clamp ( const OdGePoint2d point) const
inline

Returns UV-point inside this UV-box, which is closest to the specified one.

Parameters
point[in] UV point.

Definition at line 248 of file GeUvBox.h.

◆ contains() [1/2]

bool OdGeUvBox::contains ( const OdGePoint2d uvpoint) const

Determines whether coordinates of passed 2D point are inside corresponding intervals.

Parameters
uvpoint[in] A 2D point, coordinates of which are tested to be inside corresponding intervals of this UV box.
Remarks
Returns true only if: (uvpoint.x lies between u.lowerBound and u.upperBound) && (uvpoint.y lies between v.lowerBound and v.upperBound).

◆ contains() [2/2]

bool OdGeUvBox::contains ( double  uparam,
double  vparam 
) const

Determines whether passed parameter values are inside corresponding intervals.

Parameters
uparam[in] A parameter value that is presumably inside the U interval of this UV box.
vparam[in] A parameter value that is presumably inside the V interval of this UV box.
Remarks
Returns true only if both passed values lie inside corresponding intervals.

◆ eval()

OdGePoint2d OdGeUvBox::eval ( double  ratioU,
double  ratioV 
) const
inline

Evaluates parameter value by the interval ratio for U and V parameters and returns a 2D point with corresponding coordinates.

Parameters
ratioU[in] A ratio for evaluation the U parameter from the interval.
ratioV[in] A ratio for evaluation the V parameter from the interval.
Remarks
Use this method only if parameter intervals are bounded. Ratio values range from 0 to 1, where 0 represents the lower bound of interval and 1 represents the upper bound of interval.

Definition at line 237 of file GeUvBox.h.

◆ finiteIntersectWith()

bool OdGeUvBox::finiteIntersectWith ( const OdGeUvBox range,
OdGeUvBox result 
) const

Find finite sub-envelope belonging both to the specified range and this one

Returns
true if and only if the specified uv-box intersects with this one, and the resulting uv-box is bounded.
Parameters
range[in] The uv-box to be intersected.
result[out] Receives the intersected uv-box.

◆ isBounded()

bool OdGeUvBox::isBounded ( ) const

Determines if intervals of this UV box are bounded.

Remarks
Returns true only if both intervals (U and V) are bounded (below and above).

◆ isEqualTo()

bool OdGeUvBox::isEqualTo ( const OdGeUvBox uvbox) const

Compares input UV box to this UV box.

Parameters
uvbox[in] Input UV box that is compared.
Remarks
Returns true only if compared UV box has the same parameter intervals for U and V (with equal corresponding bounds).

◆ lowerBound()

OdGePoint2d OdGeUvBox::lowerBound ( ) const
inline

Returns lower bound of both intervals as 2D point.

Remarks
pnt.x = u.lowerBound pnt.y = v.lowerBound

Definition at line 188 of file GeUvBox.h.

◆ operator OdGeExtents2d()

OdGeUvBox::operator OdGeExtents2d ( ) const

This operator constructs OdGeExtents2d object from this UV box structure.

Remarks
Resulting Extents2d properties: min_pnt.x = u.lowerBound min_pnt.y = v.lowerBound max_pnt.x = u.upperBound max_pnt.y = v.upperBound

◆ operator[]() [1/2]

OdGeInterval & OdGeUvBox::operator[] ( int  idx)
inline

Returns an interval either for U or V parameter.

Parameters
idx[in] index that determines which interval (U or V) should be returned.

Definition at line 98 of file GeUvBox.h.

◆ operator[]() [2/2]

const OdGeInterval & OdGeUvBox::operator[] ( int  idx) const
inline

Returns a constant reference to an interval either for U or V parameter.

Parameters
idx[in] index that determines which interval (U or V) should be returned.

Definition at line 91 of file GeUvBox.h.

◆ set() [1/3]

OdGeUvBox & OdGeUvBox::set ( )
inline

Sets the U and V intervals to have upperBound = lowerBound = 0 and returns a reference to this UV box.

Remarks
UV box has unbounded intervals.

Definition at line 106 of file GeUvBox.h.

◆ set() [2/3]

OdGeUvBox & OdGeUvBox::set ( const OdGeInterval iIntervalU,
const OdGeInterval iIntervalV 
)
inline

Sets the U and V intervals for this UV box.

Parameters
iIntervalU[in] Interval for U parameter to be set for this UV box.
iIntervalV[in] Interval for V parameter to be set for this UV box.

Definition at line 119 of file GeUvBox.h.

◆ set() [3/3]

OdGeUvBox & OdGeUvBox::set ( const OdGePoint2d iLowerBound,
const OdGePoint2d iUpperBound 
)

Sets the U and V intervals for this UV box according to the passed 2D points.

Parameters
iLowerBound[in] 2D point that defines the lower bound for U and V parameter of this UV box.
iUpperBound[in] 2D point that defines the upper bound for U and V parameter of this UV box.
Remarks
Lower U bound = iLowerBound.x Lower V bound = iLowerBound.y Upper U bound = iUpperBound.x Upper V bound = iUpperBound.y

◆ u() [1/2]

OdGeInterval & OdGeUvBox::u ( )
inline

Returns an interval that represents bounds of the U parameter.

Definition at line 79 of file GeUvBox.h.

◆ u() [2/2]

const OdGeInterval & OdGeUvBox::u ( ) const
inline

Returns a constant reference to an interval that represents bounds of the U parameter.

Definition at line 69 of file GeUvBox.h.

◆ upperBound()

OdGePoint2d OdGeUvBox::upperBound ( ) const
inline

Returns upper bound of both intervals as 2D point.

Remarks
pnt.x = u.upperBound pnt.y = v.upperBound

Definition at line 200 of file GeUvBox.h.

◆ v() [1/2]

OdGeInterval & OdGeUvBox::v ( )
inline

Returns an interval that represents bounds of the V parameter.

Definition at line 84 of file GeUvBox.h.

◆ v() [2/2]

const OdGeInterval & OdGeUvBox::v ( ) const
inline

Returns a constant reference to an interval that represents bounds of the V parameter.

Definition at line 74 of file GeUvBox.h.

Member Data Documentation

◆ intervals

OdGeInterval OdGeUvBox::intervals[2]

U and V intervals.

Definition at line 44 of file GeUvBox.h.


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