All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fcl::Interval Struct Reference

Interval class for [a, b]. More...

#include <hpp/fcl/ccd/interval.h>

Public Member Functions

 Interval ()
 
 Interval (FCL_REAL v)
 
 Interval (FCL_REAL left, FCL_REAL right)
 construct interval [left, right] More...
 
void setValue (FCL_REAL a, FCL_REAL b)
 construct interval [left, right] More...
 
void setValue (FCL_REAL x)
 construct zero interval [x, x] More...
 
FCL_REAL operator[] (size_t i) const
 access the interval endpoints: 0 for left, 1 for right end More...
 
FCL_REALoperator[] (size_t i)
 access the interval endpoints: 0 for left, 1 for right end More...
 
bool operator== (const Interval &other) const
 whether two intervals are the same More...
 
Interval operator+ (const Interval &other) const
 add two intervals More...
 
Interval operator- (const Interval &other) const
 minus another interval More...
 
Intervaloperator+= (const Interval &other)
 
Intervaloperator-= (const Interval &other)
 
Interval operator* (const Interval &other) const
 
Intervaloperator*= (const Interval &other)
 
Interval operator* (FCL_REAL d) const
 
Intervaloperator*= (FCL_REAL d)
 
Interval operator/ (const Interval &other) const
 other must not contain 0 More...
 
Intervaloperator/= (const Interval &other)
 
bool overlap (const Interval &other) const
 determine whether the intersection between intervals is empty More...
 
bool intersect (const Interval &other)
 
Interval operator- () const
 
FCL_REAL getAbsLower () const
 Return the nearest distance for points within the interval to zero. More...
 
FCL_REAL getAbsUpper () const
 Return the farthest distance for points within the interval to zero. More...
 
bool contains (FCL_REAL v) const
 
Intervalbound (FCL_REAL v)
 Compute the minimum interval contains v and original interval. More...
 
Intervalbound (const Interval &other)
 Compute the minimum interval contains other and original interval. More...
 
void print () const
 
FCL_REAL center () const
 
FCL_REAL diameter () const
 

Public Attributes

FCL_REAL i_ [2]
 

Detailed Description

Interval class for [a, b].

Constructor & Destructor Documentation

fcl::Interval::Interval ( )
inline

Referenced by operator*(), operator+(), and operator-().

fcl::Interval::Interval ( FCL_REAL  v)
inlineexplicit

References v.

fcl::Interval::Interval ( FCL_REAL  left,
FCL_REAL  right 
)
inline

construct interval [left, right]

Member Function Documentation

Interval& fcl::Interval::bound ( FCL_REAL  v)
inline

Compute the minimum interval contains v and original interval.

References v.

Interval& fcl::Interval::bound ( const Interval other)
inline

Compute the minimum interval contains other and original interval.

References i_.

FCL_REAL fcl::Interval::center ( ) const
inline
bool fcl::Interval::contains ( FCL_REAL  v) const
inline
FCL_REAL fcl::Interval::diameter ( ) const
inline
FCL_REAL fcl::Interval::getAbsLower ( ) const
inline

Return the nearest distance for points within the interval to zero.

FCL_REAL fcl::Interval::getAbsUpper ( ) const
inline

Return the farthest distance for points within the interval to zero.

bool fcl::Interval::intersect ( const Interval other)
inline

References i_.

Interval fcl::Interval::operator* ( const Interval other) const
Interval fcl::Interval::operator* ( FCL_REAL  d) const
inline

References Interval().

Interval& fcl::Interval::operator*= ( const Interval other)
Interval& fcl::Interval::operator*= ( FCL_REAL  d)
inline
Interval fcl::Interval::operator+ ( const Interval other) const
inline

add two intervals

References i_, and Interval().

Interval& fcl::Interval::operator+= ( const Interval other)
inline

References i_.

Interval fcl::Interval::operator- ( const Interval other) const
inline

minus another interval

References i_, and Interval().

Interval fcl::Interval::operator- ( ) const
inline

References Interval().

Interval& fcl::Interval::operator-= ( const Interval other)
inline

References i_.

Interval fcl::Interval::operator/ ( const Interval other) const

other must not contain 0

Interval& fcl::Interval::operator/= ( const Interval other)
bool fcl::Interval::operator== ( const Interval other) const
inline

whether two intervals are the same

References i_.

FCL_REAL fcl::Interval::operator[] ( size_t  i) const
inline

access the interval endpoints: 0 for left, 1 for right end

FCL_REAL& fcl::Interval::operator[] ( size_t  i)
inline

access the interval endpoints: 0 for left, 1 for right end

bool fcl::Interval::overlap ( const Interval other) const
inline

determine whether the intersection between intervals is empty

References i_.

void fcl::Interval::print ( ) const
void fcl::Interval::setValue ( FCL_REAL  a,
FCL_REAL  b 
)
inline

construct interval [left, right]

Referenced by fcl::IVector3::setValue(), and fcl::TimeInterval::setValue().

void fcl::Interval::setValue ( FCL_REAL  x)
inline

construct zero interval [x, x]

Member Data Documentation