CFx SDK Documentation  2020SP3
Public Member Functions | Friends | List of all members
OdGeInterval Class Reference

#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)
 
 ~OdGeInterval ()
 
double lowerBound () const
 
double upperBound () const
 
double element () const
 
void getBounds (double &lower, double &upper) const
 
double length () const
 
double tolerance () const
 
OdGeIntervalset (double lower, double upper)
 
OdGeIntervalset (bool boundedBelow, double bound)
 
OdGeIntervalset ()
 
OdGeIntervalsetUpper (double upper)
 
OdGeIntervalsetLower (double lower)
 
OdGeIntervalsetTolerance (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 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
 
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)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ OdGeInterval() [1/3]

OdGeInterval::OdGeInterval ( double  tol = 1.e-12)
Parameters
lower[in] Lower bound.
upper[in] Upper bound.
tol[in] Boundary tolerance.
boundedBelow[in] Determines if the interval is bounded below.
bound[in] Specifies a lower and upper bounds if boundedBelow is true, or only an upper bound if it is false.
Remarks
With no arguments other than tol, creates an unbounded interval.

◆ OdGeInterval() [2/3]

OdGeInterval::OdGeInterval ( double  lower,
double  upper,
double  tol = 1.e-12 
)

◆ OdGeInterval() [3/3]

OdGeInterval::OdGeInterval ( bool  boundedBelow,
double  bound,
double  tol = 1.e-12 
)

◆ ~OdGeInterval()

OdGeInterval::~OdGeInterval ( )

Member Function Documentation

◆ contains() [1/2]

bool OdGeInterval::contains ( const OdGeInterval otherInterval) const

Returns true if and only if this interval contains the specified value or Interval.

Remarks
Returns true if and only if this Interval contains value or otherInterval within tolerance().
Parameters
otherInterval[in] The Interval to be tested.
value[in] The value to be tested.

◆ contains() [2/2]

bool OdGeInterval::contains ( double  value) const

◆ element()

double OdGeInterval::element ( ) const

Returns a point on this interval.

Remarks
Above Bounded Below Returns Yes — Upper Bound No Yes Lower Bound No No 0.0

◆ getBounds()

void OdGeInterval::getBounds ( double &  lower,
double &  upper 
) const

Returns the bounds of this interval.

Parameters
lower[out] Receives the Lower bound.
upper[out] Receives the Upper bound.

◆ getMerge()

void OdGeInterval::getMerge ( const OdGeInterval otherInterval,
OdGeInterval result 
) const

Returns the smallest interval containing both the specified interval and this interval.

Parameters
otherInterval[in] The interval to be merged with this one.
result[out] Receives the merged interval.

◆ intersectWith()

bool OdGeInterval::intersectWith ( const OdGeInterval otherInterval,
OdGeInterval result 
) const

Intersects the specified interval from this one.

Returns
Returns true if and only this specified interval intersects with this one, and the interval of intersection.
Parameters
otherInterval[in] The interval to be intersected.
result[out] Receives the intersected interval.

◆ isBounded()

bool OdGeInterval::isBounded ( ) const

Returns true if and only if this interval is bounded above and below.

◆ isBoundedAbove()

bool OdGeInterval::isBoundedAbove ( ) const

Returns true if and only if this interval is bounded above.

◆ isBoundedBelow()

bool OdGeInterval::isBoundedBelow ( ) const

Returns true if and only if this interval is bounded below.

◆ isContinuousAtUpper()

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.

Remarks
Returns true if and only if this Interval is bounded above, otherInterval is bounded below, and the upper bound of this Interval is equal to the lower bound of otherInterval within tolerance().
Parameters
otherInterval[in] The Interval to be tested.

◆ isDisjoint()

bool OdGeInterval::isDisjoint ( const OdGeInterval otherInterval) const

Returns true if and only if the specified interval is disjoint from this interval.

Remarks
Returns true if and only if this interval does not intersect otherInterval within tolerance().
Parameters
otherInterval[in] The interval to be tested.

◆ isEqualAtLower() [1/2]

bool OdGeInterval::isEqualAtLower ( const OdGeInterval otherInterval) const

Returns true if and only if lower bounds of the specified Interval and this Interval are equal.

Remarks
Returns true if and only if
  1. Both this Interval and otherInterval are unbounded below or bounded below with their lower bounds equal within tolerance.
Parameters
otherInterval[in] The Interval to be tested.

◆ isEqualAtLower() [2/2]

bool OdGeInterval::isEqualAtLower ( double  value) const

Returns true if and only if lower bounds of the specified Interval and this Interval are equal.

Remarks
Returns true if and only if
  1. This Interval is bounded below, and the lower bound is equal to value within tolerance.
Parameters
value[in] The value to be tested.

◆ isEqualAtUpper() [1/2]

bool OdGeInterval::isEqualAtUpper ( const OdGeInterval otherInterval) const

Returns true if and only if upper bounds of the specified Interval and this Interval are equal.

Remarks

Returns true if and only if

  1. Both this Interval and otherInterval are unbounded above or bounded above with their upper bounds equal within tolerance().
Parameters
otherInterval[in] The Interval to be tested.

◆ isEqualAtUpper() [2/2]

bool OdGeInterval::isEqualAtUpper ( double  value) const

Returns true if and only if upper bounds of the specified Interval and this Interval are equal.

Remarks

Returns true if and only if

  1. This Interval is bounded above, and the upper bound is equal to value within tolerance().
Parameters
value[in] The value to be tested.

◆ isOverlapAtUpper()

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.

Remarks
Returns true if and only if
  1. This Interval is bounded above, otherInterval is bounded below.
  2. Neither Interval is a singleton.
  3. The Intervals Intersect.
  4. otherInterval does not contain this one.
  5. The upper bound of this Interval is contained in otherInterval.
  6. The lower bound of otherInterval is contained within this one.

If all these conditions are met, this function returns the intersection of the Intervals.

Parameters
otherInterval[in] The Interval to be tested.
overlap[out] Receives the overlap of the Intervals.

◆ isPeriodicallyOn()

bool OdGeInterval::isPeriodicallyOn ( double  period,
double &  value 
)

Returns true if and only if the specified value is periodically on this Interval.

Remarks
Returns true if and only if there is a positive integer N such that
    value + N * period

is on this Interval. If so, returns that value.

Parameters
period[in] Period.
value[in/out] Value.

◆ isSingleton()

bool OdGeInterval::isSingleton ( ) const

Returns true if and only if this interval object is a singleton.

Remarks
Returns true if and only if this interval is bounded, and the upper and lower bounds are equal within tolerance().

◆ isUnBounded()

bool OdGeInterval::isUnBounded ( ) const

Returns true if and only if this interval is unbounded above or below.

◆ length()

double OdGeInterval::length ( ) const

Returns the length of this interval.

Returns
Returns -1.0 if this interval is unbounded above or below.

◆ lowerBound()

double OdGeInterval::lowerBound ( ) const

Returns the lower bound of this interval.

Remarks
This value is meaningful if and only if the interval has a lower bound.

◆ operator!=()

bool OdGeInterval::operator!= ( const OdGeInterval otherInterval) const

◆ operator<() [1/2]

bool OdGeInterval::operator< ( const OdGeInterval otherInterval) const

◆ operator<() [2/2]

bool OdGeInterval::operator< ( double  value) const

◆ operator<=() [1/2]

bool OdGeInterval::operator<= ( const OdGeInterval otherInterval) const

◆ operator<=() [2/2]

bool OdGeInterval::operator<= ( double  value) const

◆ operator==()

bool OdGeInterval::operator== ( const OdGeInterval otherInterval) const

◆ operator>() [1/2]

bool OdGeInterval::operator> ( const OdGeInterval otherInterval) const

◆ operator>() [2/2]

bool OdGeInterval::operator> ( double  value) const

◆ operator>=() [1/2]

bool OdGeInterval::operator>= ( const OdGeInterval otherInterval) const

◆ operator>=() [2/2]

bool OdGeInterval::operator>= ( double  value) const

◆ set() [1/3]

OdGeInterval& OdGeInterval::set ( )

Unbounds this interval.

Returns
Returns a reference to this interval.

◆ set() [2/3]

OdGeInterval& OdGeInterval::set ( bool  boundedBelow,
double  bound 
)

Sets the parameters for this interval according to the arguments.

Parameters
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.
Returns
Returns a reference to this interval.

◆ set() [3/3]

OdGeInterval& OdGeInterval::set ( double  lower,
double  upper 
)

Sets the parameters for this interval according to the arguments.

Parameters
lower[in] Lower bound.
upper[in] Upper bound.
Returns
Returns a reference to this interval.

◆ setLower()

OdGeInterval& OdGeInterval::setLower ( double  lower)

Sets the lower bound for this interval.

Parameters
lower[in] Lower bound.
Returns
Returns a reference to this interval.

◆ setTolerance()

OdGeInterval& OdGeInterval::setTolerance ( double  tol)

Sets the boundary tolerance for this interval.

Parameters
tol[in] Boundary tolerance.
Returns
Returns a reference to this interval.

◆ setUpper()

OdGeInterval& OdGeInterval::setUpper ( double  upper)

Sets the upper bound for this interval.

Parameters
upper[in] Upper bound.

◆ subtract()

int OdGeInterval::subtract ( const OdGeInterval otherInterval,
OdGeInterval lInterval,
OdGeInterval rInterval 
) const

Subtracts the specified interval from this interval.

Returns
Returns the number of intervals, and the intervals, resulting from the subtraction
Parameters
otherInterval[in] The interval to be subtracted from this one.
lInterval[out] Receives the Left (or only) interval.
rInterval[out] Receives the right interval.
Remarks
value Results 0 Empty result 1 Single interval in lInterval 2 Left in lInterval, Right in rInterval.

◆ tolerance()

double OdGeInterval::tolerance ( ) const

Returns the boundary tolerance for this interval.

◆ upperBound()

double OdGeInterval::upperBound ( ) const

Returns the upper bound of this interval.

Remarks
This value is meaningful if and only if the interval has an upper bound.

Friends And Related Function Documentation

◆ operator<

bool operator< ( double  value,
const OdGeInterval interval 
)
friend

◆ operator<=

bool operator<= ( double  value,
const OdGeInterval interval 
)
friend

◆ operator>

bool operator> ( double  value,
const OdGeInterval interval 
)
friend

◆ operator>=

bool operator>= ( double  value,
const OdGeInterval interval 
)
friend

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