CFx SDK Documentation 2024 SP0
|
#include <GeInterval.h>
Public Member Functions | |
OdGeInterval (double tol=1.e-12) | |
OdGeInterval (double lower, double upper, double tol=1.e-12) | |
OdGeInterval (bool boundedBelow, double bound, double tol=1.e-12) | |
double | lowerBound () const |
double | upperBound () const |
double | middle () const |
double | element () const |
void | getBounds (double &lower, double &upper) const |
double | getEnd (int index) const |
double | length () const |
double | tolerance () const |
double | eval (double ratio) const |
OdGeInterval & | set (double lower, double upper) |
OdGeInterval & | set (bool boundedBelow, double bound) |
OdGeInterval & | set () |
OdGeInterval & | setUpper (double upper) |
OdGeInterval & | setLower (double lower) |
OdGeInterval & | setTolerance (double tol) |
void | getMerge (const OdGeInterval &otherInterval, OdGeInterval &result) const |
int | subtract (const OdGeInterval &otherInterval, OdGeInterval &lInterval, OdGeInterval &rInterval) const |
bool | intersectWith (const OdGeInterval &otherInterval, OdGeInterval &result) const |
bool | finiteIntersectWith (const OdGeInterval &range, OdGeInterval &result) const |
bool | isBounded () const |
bool | isBoundedAbove () const |
bool | isBoundedBelow () const |
bool | isUnBounded () const |
bool | isSingleton () const |
bool | isDisjoint (const OdGeInterval &otherInterval) const |
bool | contains (const OdGeInterval &otherInterval) const |
bool | contains (double value) const |
double | clamp (double value) const |
bool | isContinuousAtUpper (const OdGeInterval &otherInterval) const |
bool | isOverlapAtUpper (const OdGeInterval &otherInterval, OdGeInterval &overlap) const |
bool | operator== (const OdGeInterval &otherInterval) const |
bool | operator!= (const OdGeInterval &otherInterval) const |
bool | isEqualAtUpper (const OdGeInterval &otherInterval) const |
bool | isEqualAtUpper (double value) const |
bool | isEqualAtLower (const OdGeInterval &otherInterval) const |
bool | isEqualAtLower (double value) const |
bool | isPeriodicallyOn (double period, double &value) |
bool | operator> (double value) const |
bool | operator> (const OdGeInterval &otherInterval) const |
bool | operator>= (double value) const |
bool | operator>= (const OdGeInterval &otherInterval) const |
bool | operator< (double value) const |
bool | operator< (const OdGeInterval &otherInterval) const |
bool | operator<= (double value) const |
bool | operator<= (const OdGeInterval &otherInterval) const |
Friends | |
bool | operator> (double value, const OdGeInterval &interval) |
bool | operator>= (double value, const OdGeInterval &interval) |
bool | operator< (double value, const OdGeInterval &interval) |
bool | operator<= (double value, const OdGeInterval &interval) |
This class represents a finite, infinite, or semi-infinite interval as the real axis.
Corresponding C++ library: TD_Ge
<group OdGe_Classes>
Definition at line 39 of file GeInterval.h.
|
inline |
Constructor for the OdGeInterval class. Creates an unbounded interval with the specified tolerance.
tol | [in] Boundary tolerance. |
Definition at line 47 of file GeInterval.h.
|
inline |
Constructor for the OdGeInterval class.
lower | [in] Lower bound. |
upper | [in] Upper bound. |
tol | [in] Boundary tolerance. |
Definition at line 63 of file GeInterval.h.
OdGeInterval::OdGeInterval | ( | bool | boundedBelow, |
double | bound, | ||
double | tol = 1.e-12 |
||
) |
Constructor for the OdGeInterval class.
boundedBelow | [in] Determines if the interval is bounded below. |
bound | [in] Upper or lower bound. |
tol | [in] Boundary tolerance. If boundedBelow is true, the constructor sets the lower bound also to bound; otherwise the interval remains unbounded below. |
|
inline |
Corrects the parameter so that it belongs to the interval. If parameter is already within interval, then it is returned as is. Otherwise parameter is moved to closest of endpoints.
value | [in] The parameter to be corrected. |
Definition at line 415 of file GeInterval.h.
bool OdGeInterval::contains | ( | const OdGeInterval & | otherInterval | ) | const |
Checks whether this interval contains the specified interval within tolerance().
otherInterval | [in] The interval to be tested. |
|
inline |
Checks whether this interval contains the specified value within tolerance().
value | [in] The value to be tested. |
Definition at line 401 of file GeInterval.h.
double OdGeInterval::element | ( | ) | const |
Returns a point on this interval.
|
inline |
Returns parameter L + (R-L) * t for given ratio t. Note: if the interval is unbounded, behavior is undefined!
ratio | [in] Arbitrary number |
Definition at line 180 of file GeInterval.h.
bool OdGeInterval::finiteIntersectWith | ( | const OdGeInterval & | range, |
OdGeInterval & | result | ||
) | const |
Find finite sub-interval belonging both to the specified range and this one
range | [in] The interval to be intersected. |
result | [out] Receives the intersected interval. |
|
inline |
Returns the bounds of this interval.
lower | [out] Receives the Lower bound. |
upper | [out] Receives the Upper bound. |
Definition at line 135 of file GeInterval.h.
|
inline |
Returns the parameter of interval's end.
index | Must be 0 (interval start) or 1 (interval end), otherwise behavior is undefined. |
Definition at line 148 of file GeInterval.h.
void OdGeInterval::getMerge | ( | const OdGeInterval & | otherInterval, |
OdGeInterval & | result | ||
) | const |
Returns the smallest interval containing both the specified interval and this interval.
otherInterval | [in] The interval to be merged with this one. |
result | [out] Receives the merged interval. |
bool OdGeInterval::intersectWith | ( | const OdGeInterval & | otherInterval, |
OdGeInterval & | result | ||
) | const |
Intersects the specified interval from this one.
otherInterval | [in] The interval to be intersected. |
result | [out] Receives the intersected interval. |
|
inline |
Returns true if and only if this interval is bounded above and below.
Definition at line 336 of file GeInterval.h.
|
inline |
Returns true if and only if this interval is bounded above.
Definition at line 344 of file GeInterval.h.
|
inline |
Returns true if and only if this interval is bounded below.
Definition at line 352 of file GeInterval.h.
bool OdGeInterval::isContinuousAtUpper | ( | const OdGeInterval & | otherInterval | ) | const |
Returns true if and only if the specified Interval is continuous with the upper bound of this Interval.
otherInterval | [in] The Interval to be tested. |
bool OdGeInterval::isDisjoint | ( | const OdGeInterval & | otherInterval | ) | const |
Returns true if and only if the specified interval is disjoint from this interval.
otherInterval | [in] The interval to be tested. |
bool OdGeInterval::isEqualAtLower | ( | const OdGeInterval & | otherInterval | ) | const |
Returns true if and only if lower bounds of the specified Interval and this Interval are equal.
otherInterval | [in] The Interval to be tested. |
bool OdGeInterval::isEqualAtLower | ( | double | value | ) | const |
Returns true if and only if lower bounds of the specified Interval and this Interval are equal.
value | [in] The value to be tested. |
bool OdGeInterval::isEqualAtUpper | ( | const OdGeInterval & | otherInterval | ) | const |
Returns true if and only if upper bounds of the specified Interval and this Interval are equal.
Returns true if and only if
otherInterval | [in] The Interval to be tested. |
bool OdGeInterval::isEqualAtUpper | ( | double | value | ) | const |
Returns true if and only if upper bounds of the specified Interval and this Interval are equal.
Returns true if and only if
value | [in] The value to be tested. |
bool OdGeInterval::isOverlapAtUpper | ( | const OdGeInterval & | otherInterval, |
OdGeInterval & | overlap | ||
) | const |
Returns true if and only if the specified Interval and this Interval overlap at the upper bound of this Interval.
If all these conditions are met, this function returns the intersection of the Intervals.
otherInterval | [in] The Interval to be tested. |
overlap | [out] Receives the overlap of the Intervals. |
bool OdGeInterval::isPeriodicallyOn | ( | double | period, |
double & | value | ||
) |
Checks whether the specified value is periodically on this interval.
period | [in] Period. |
value | [in/out] Value. |
<pre> value + N * period </pre>is on this interval. If so, returns that value.
bool OdGeInterval::isSingleton | ( | ) | const |
Returns true if and only if this interval object is a singleton.
|
inline |
Returns true if and only if this interval is unbounded above or below.
Definition at line 360 of file GeInterval.h.
|
inline |
Returns the length of this interval.
Definition at line 161 of file GeInterval.h.
|
inline |
Returns the lower bound of this interval.
Definition at line 91 of file GeInterval.h.
|
inline |
Returns the center point of this interval.
Definition at line 111 of file GeInterval.h.
bool OdGeInterval::operator!= | ( | const OdGeInterval & | otherInterval | ) | const |
Comparison operator for the OdGeInterval object.
otherInterval | [in] Other interval. |
bool OdGeInterval::operator< | ( | const OdGeInterval & | otherInterval | ) | const |
bool OdGeInterval::operator< | ( | double | value | ) | const |
bool OdGeInterval::operator<= | ( | const OdGeInterval & | otherInterval | ) | const |
bool OdGeInterval::operator<= | ( | double | value | ) | const |
bool OdGeInterval::operator== | ( | const OdGeInterval & | otherInterval | ) | const |
Comparison operator for the OdGeInterval object.
otherInterval | [in] Other interval. |
bool OdGeInterval::operator> | ( | const OdGeInterval & | otherInterval | ) | const |
bool OdGeInterval::operator> | ( | double | value | ) | const |
bool OdGeInterval::operator>= | ( | const OdGeInterval & | otherInterval | ) | const |
bool OdGeInterval::operator>= | ( | double | value | ) | const |
|
inline |
Unbounds this interval.
Definition at line 224 of file GeInterval.h.
OdGeInterval & OdGeInterval::set | ( | bool | boundedBelow, |
double | bound | ||
) |
Sets the parameters for this interval according to the arguments.
boundedBelow | [in] Determines if bound specifies a lower or an upper bound. |
bound | [in] Specifies a lower bound if boundedBelow is true, or an upper bound if it is false. |
|
inline |
Sets the parameters for this interval according to the arguments.
lower | [in] Lower bound. |
upper | [in] Upper bound. |
Definition at line 196 of file GeInterval.h.
|
inline |
Sets the lower bound for this interval.
lower | [in] Lower bound. |
Definition at line 252 of file GeInterval.h.
|
inline |
Sets the boundary tolerance for this interval.
tol | [in] Boundary tolerance. |
Definition at line 268 of file GeInterval.h.
|
inline |
Sets the upper bound for this interval.
upper | [in] Upper bound. |
Definition at line 237 of file GeInterval.h.
int OdGeInterval::subtract | ( | const OdGeInterval & | otherInterval, |
OdGeInterval & | lInterval, | ||
OdGeInterval & | rInterval | ||
) | const |
Subtracts the specified interval from this interval.
otherInterval | [in] The interval to be subtracted from this one. |
lInterval | [out] Receives the Left (or only) interval. |
rInterval | [out] Receives the right interval. |
|
inline |
Returns the boundary tolerance for this interval.
Definition at line 169 of file GeInterval.h.
|
inline |
Returns the upper bound of this interval.
Definition at line 101 of file GeInterval.h.
|
friend |
|
friend |
|
friend |
|
friend |