Interval class for [a, b]. More...
#include <interval.h>
Public Member Functions | |
Interval & | bound (FCL_REAL v) |
Compute the minimum interval contains v and original interval. | |
Interval & | bound (const Interval &other) |
Compute the minimum interval contains other and original interval. | |
FCL_REAL | center () const |
bool | contains (FCL_REAL v) const |
FCL_REAL | diameter () const |
FCL_REAL | getAbsLower () const |
Return the nearest distance for points within the interval to zero. | |
FCL_REAL | getAbsUpper () const |
Return the farthest distance for points within the interval to zero. | |
bool | intersect (const Interval &other) |
Interval () | |
Interval (FCL_REAL v) | |
Interval (FCL_REAL left, FCL_REAL right) | |
construct interval [left, right] | |
Interval | operator* (const Interval &other) const |
Interval | operator* (FCL_REAL d) const |
Interval & | operator*= (const Interval &other) |
Interval & | operator*= (FCL_REAL d) |
Interval | operator+ (const Interval &other) const |
add two intervals | |
Interval & | operator+= (const Interval &other) |
Interval | operator- (const Interval &other) const |
minus another interval | |
Interval | operator- () const |
Interval & | operator-= (const Interval &other) |
Interval | operator/ (const Interval &other) const |
other must not contain 0 | |
Interval & | operator/= (const Interval &other) |
bool | operator== (const Interval &other) const |
whether two intervals are the same | |
FCL_REAL | operator[] (size_t i) const |
access the interval endpoints: 0 for left, 1 for right end | |
FCL_REAL & | operator[] (size_t i) |
access the interval endpoints: 0 for left, 1 for right end | |
bool | overlap (const Interval &other) const |
determine whether the intersection between intervals is empty | |
void | print () const |
void | setValue (FCL_REAL a, FCL_REAL b) |
construct interval [left, right] | |
void | setValue (FCL_REAL x) |
construct zero interval [x, x] | |
Public Attributes | |
FCL_REAL | i_ [2] |
Interval class for [a, b].
Definition at line 47 of file interval.h.
fcl::Interval::Interval | ( | ) | [inline] |
Definition at line 51 of file interval.h.
fcl::Interval::Interval | ( | FCL_REAL | v | ) | [inline, explicit] |
Definition at line 53 of file interval.h.
fcl::Interval::Interval | ( | FCL_REAL | left, |
FCL_REAL | right | ||
) | [inline] |
construct interval [left, right]
Definition at line 59 of file interval.h.
Interval& fcl::Interval::bound | ( | FCL_REAL | v | ) | [inline] |
Compute the minimum interval contains v and original interval.
Definition at line 200 of file interval.h.
Interval& fcl::Interval::bound | ( | const Interval & | other | ) | [inline] |
Compute the minimum interval contains other and original interval.
Definition at line 209 of file interval.h.
FCL_REAL fcl::Interval::center | ( | ) | const [inline] |
Definition at line 218 of file interval.h.
bool fcl::Interval::contains | ( | FCL_REAL | v | ) | const [inline] |
Definition at line 192 of file interval.h.
FCL_REAL fcl::Interval::diameter | ( | ) | const [inline] |
Definition at line 219 of file interval.h.
FCL_REAL fcl::Interval::getAbsLower | ( | ) | const [inline] |
Return the nearest distance for points within the interval to zero.
Definition at line 177 of file interval.h.
FCL_REAL fcl::Interval::getAbsUpper | ( | ) | const [inline] |
Return the farthest distance for points within the interval to zero.
Definition at line 185 of file interval.h.
bool fcl::Interval::intersect | ( | const Interval & | other | ) | [inline] |
Definition at line 162 of file interval.h.
Definition at line 59 of file interval.cpp.
Definition at line 126 of file interval.h.
Definition at line 93 of file interval.cpp.
Definition at line 132 of file interval.h.
add two intervals
Definition at line 97 of file interval.h.
Definition at line 108 of file interval.h.
minus another interval
Definition at line 103 of file interval.h.
Interval fcl::Interval::operator- | ( | ) | const [inline] |
Definition at line 171 of file interval.h.
Definition at line 115 of file interval.h.
other must not contain 0
Definition at line 187 of file interval.cpp.
Definition at line 192 of file interval.cpp.
bool fcl::Interval::operator== | ( | const Interval & | other | ) | const [inline] |
whether two intervals are the same
Definition at line 89 of file interval.h.
FCL_REAL fcl::Interval::operator[] | ( | size_t | i | ) | const [inline] |
access the interval endpoints: 0 for left, 1 for right end
Definition at line 77 of file interval.h.
FCL_REAL& fcl::Interval::operator[] | ( | size_t | i | ) | [inline] |
access the interval endpoints: 0 for left, 1 for right end
Definition at line 83 of file interval.h.
bool fcl::Interval::overlap | ( | const Interval & | other | ) | const [inline] |
determine whether the intersection between intervals is empty
Definition at line 155 of file interval.h.
void fcl::Interval::print | ( | ) | const |
Definition at line 198 of file interval.cpp.
void fcl::Interval::setValue | ( | FCL_REAL | a, |
FCL_REAL | b | ||
) | [inline] |
construct interval [left, right]
Definition at line 65 of file interval.h.
void fcl::Interval::setValue | ( | FCL_REAL | x | ) | [inline] |
construct zero interval [x, x]
Definition at line 71 of file interval.h.
Definition at line 49 of file interval.h.