FCL  0.6.0
Flexible Collision Library
fcl::Interval< S > Struct Template Reference

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

#include <interval.h>

Public Member Functions

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

Public Attributes

S i_ [2]
 

Detailed Description

template<typename S>
struct fcl::Interval< S >

Interval class for [a, b].


The documentation for this struct was generated from the following files: