|
CFx SDK Documentation 2026 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) |
| OdGeInterval & | scale (double factor) |
| OdGeInterval & | swap () |
| 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 438 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 424 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 182 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 137 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 150 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 359 of file GeInterval.h.
|
inline |
Returns true if and only if this interval is bounded above.
Definition at line 367 of file GeInterval.h.
|
inline |
Returns true if and only if this interval is bounded below.
Definition at line 375 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 383 of file GeInterval.h.
|
inline |
Returns the length of this interval.
Definition at line 163 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 113 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 |
| OdGeInterval & OdGeInterval::scale | ( | double | factor | ) |
Scales the parameters of this interval by the provided scale factor.
| factor | [in] Scale factor. |
|
inline |
Unbounds this interval.
Definition at line 226 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 198 of file GeInterval.h.
|
inline |
Sets the lower bound for this interval.
| lower | [in] Lower bound. |
Definition at line 254 of file GeInterval.h.
|
inline |
Sets the boundary tolerance for this interval.
| tol | [in] Boundary tolerance. |
Definition at line 270 of file GeInterval.h.
|
inline |
Sets the upper bound for this interval.
| upper | [in] Upper bound. |
Definition at line 239 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. |
| OdGeInterval & OdGeInterval::swap | ( | ) |
Swaps the parameters of this interval.
|
inline |
Returns the boundary tolerance for this interval.
Definition at line 171 of file GeInterval.h.
|
inline |
Returns the upper bound of this interval.
Definition at line 102 of file GeInterval.h.
|
friend |
|
friend |
|
friend |
|
friend |