The Interval3d class corresponds to a bounding box in 3D space.
Interval2d and Interval3d are similar classes that keep an interval of values in 2D or 3D space, respectively. The classes were made to look uniform across 2 and 3 dimensions.
The bounds of the interval are accessed via public data members, lower and upper.
The interval classes contain operators and methods for extending or intersecting, as well as evaluating intervals.
|
| Interval3d () |
|
| Interval3d (int) |
|
| Interval3d (const Point3d &p) |
|
| Interval3d (const Point3d &a, const Point3d &b) |
|
| Interval3d (const Point3d &a, const Point3d &b, int) |
|
| Interval3d (const Point3d ¢er, double halfSize) |
|
void | operator+= (const Point3d &p) |
| Extend this interval to cover the given point. More...
|
|
void | operator+= (const Interval3d &interv) |
| Union this interval with another interval. More...
|
|
Interval3d | operator+ (const Interval3d &interv) const |
| Union two intervals and return the result. More...
|
|
void | operator*= (const Interval3d &interv) |
| Intersect this interval with another interval. More...
|
|
Interval3d & | operator*= (const Transf3d &t) |
| Apply a transformation matrix to the interval. More...
|
|
Interval3d | operator* (const Interval3d &interv) const |
| Intersect two intervals and return the result. More...
|
|
Interval3d | operator* (const Transf3d &t) const |
| Apply a transformation matrix to the interval and return the result. More...
|
|
bool | operator&& (const Interval3d &interv) const |
| Returns true iff the two intervals overlap. More...
|
|
bool | operator&& (const Point3d &p) const |
| Returns true iff the interval contains the given point. More...
|
|
bool | operator<= (const Interval3d &interv) const |
| Given a <= b, returns true if a is subinterval of b. More...
|
|
bool | isNull () const |
| Returns true if the interval is null. More...
|
|
Point3d | mid () const |
| Returns the midpoint between the lower and upper bounds of the interval. More...
|
|
void | init () |
| Initializes the interval to null. More...
|
|
void | enlarge (double howMuch=10 *WSM_DISTANCE_TOL) |
| Widen the bounds of the interval by the specified distance. More...
|
|
bool | isEqual (const Interval3d &interv, double epsSqrd=WSM_DISTANCE_TOL2) const |
| Returns true if the two intervals are equal within the given tolerance. More...
|
|
bool | boundariesTouch (const Interval3d &interv, double dTol=WSM_MACHINE_TOL) const |
| Returns true if the boundaries of the two intervals touch, i.e. the boxes share a side plane. More...
|
|
double | length () const |
| Returns the length of the interval. More...
|
|
double | lengthSqrd () const |
| Returns the length squared of the interval. More...
|
|
double | length (int i) const |
| Returns the i-th component of the interval length. More...
|
|
double | volume () const |
| Returns the volume of the interval. More...
|
|
double | area () const |
| Returns the area of the interval. More...
|
|
double | perimeter () const |
| Returns the perimeter of the interval. More...
|
|
Point3d | lowerInDirection (const UnitVector3d &direction) const |
| Returns the lower bound with respect to the given direction. More...
|
|
Point3d | upperInDirection (const UnitVector3d &direction) const |
| Returns the upper bound with respect to the given direction. More...
|
|
bool | intersectsPlane (const Plane &plane, double dTol=WSM_DISTANCE_TOL) const |
| Returns true if the interval intersects the given plane, or is within dTol above or below it. More...
|
|
bool | intersectsRay (const Line3d &Ray, double dRayRadius=WSM_MACHINE_TOL, double dMaxParam=WSM_DISTANCE_BIG) const |
| Returns true if the interval and the given ray intersect. More...
|
|
bool | boundsLine (const Line3d &line, double &dMinParam, double &dMaxParam, double dTol=WSM_MACHINE_TOL) const |
| Returns true if the interval bounds the given line. More...
|
|
::pair< bool, 1::array< WSM::Point3d, 8 > > | getBoundsPoints () |
| Get the 8 bounding box points. More...
|
|