Go::RotatedBox Class Reference
['utils' - a collection of useful math and programming tools]

A rotated version of CompositeBox. More...

#include <RotatedBox.h>

List of all members.

Public Member Functions

template<typename RandomAccessIterator>
 RotatedBox (RandomAccessIterator start, int dim, int num_u, int num_v, const Point *axis)
 Given an array of dim-dimensional points and a coordinate system given by (axis[0], axis[1], axis[0] x axis[1]), construct a rotated box containing all points.
 RotatedBox (const Point &low, const Point &high, const Point *axis)
 Creates a RotatedBox with the Point low specifying the lower bound in all dimensions and high specifying the upper bound.
 ~RotatedBox ()
 Do not inherit from this class -- nonvirtual destructor.
template<typename RandomAccessIterator>
void setFromArray (RandomAccessIterator start, int dim, int num_u, int num_v)
 Given an array of dim-dimensional points stored as doubles or floats, makes the smallest composite box containing all points in the array.
void setFromPoints (const Point &low, const Point &high)
 Makes the bounding box have lower bounds as specified in low and upper bounds as specified in high.
int dimension () const
 The dimension of the rotated box.
const CompositeBoxbox () const
 The composite box.
bool containsPoint (const Point &pt, double toli=0.0, double tole=0.0) const
 Returns true if the point pt is inside the box, up to tolerances.
bool overlaps (const RotatedBox &box, double toli=0.0, double tole=0.0) const
 Returns true if the two boxes overlap, up to tolerances.
bool containsBox (const RotatedBox &box, double toli=0.0, double tole=0.0) const
 Returns true if this box contain the box passed as a parameter,up to tolerances.


Detailed Description

A rotated version of CompositeBox.

It works in the same way, except that the boxes are aligned with an arbitrary (given) coordinate system.

Definition at line 52 of file RotatedBox.h.


Constructor & Destructor Documentation

template<typename RandomAccessIterator>
Go::RotatedBox::RotatedBox ( RandomAccessIterator  start,
int  dim,
int  num_u,
int  num_v,
const Point axis 
) [inline]

Given an array of dim-dimensional points and a coordinate system given by (axis[0], axis[1], axis[0] x axis[1]), construct a rotated box containing all points.

If in 2D, coordinate system is (axis[0], Rot(Pi/2)*axis[0])

Definition at line 60 of file RotatedBox.h.

References setFromArray().

Go::RotatedBox::RotatedBox ( const Point low,
const Point high,
const Point axis 
) [inline]

Creates a RotatedBox with the Point low specifying the lower bound in all dimensions and high specifying the upper bound.

The inner and edge boxes are equal.

Definition at line 75 of file RotatedBox.h.

References setFromPoints(), and Go::Point::size().


Member Function Documentation

template<typename RandomAccessIterator>
void Go::RotatedBox::setFromArray ( RandomAccessIterator  start,
int  dim,
int  num_u,
int  num_v 
) [inline]

Given an array of dim-dimensional points stored as doubles or floats, makes the smallest composite box containing all points in the array.

The array must be like a control point grid, with num_u points in the fastest running direction, and num_v points in the other direction. For curves, use num_v = 1.

Definition at line 96 of file RotatedBox.h.

Referenced by RotatedBox().

const CompositeBox& Go::RotatedBox::box (  )  const [inline]

The composite box.

WARNING: The coordinates of this box must be interpreted in the coordinate system given by coordsystem().

Definition at line 158 of file RotatedBox.h.

Referenced by containsBox(), and overlaps().

bool Go::RotatedBox::containsPoint ( const Point pt,
double  toli = 0.0,
double  tole = 0.0 
) const [inline]

Returns true if the point pt is inside the box, up to tolerances.

Tolerances may be specified separately for inner and edge boxes.

Definition at line 166 of file RotatedBox.h.

References dimension().

bool Go::RotatedBox::overlaps ( const RotatedBox box,
double  toli = 0.0,
double  tole = 0.0 
) const [inline]

Returns true if the two boxes overlap, up to tolerances.

Tolerances may be specified separately for inner and edge boxes.

Definition at line 185 of file RotatedBox.h.

References box(), and Go::MatrixXD< T, Dim >::frobeniusNorm().

bool Go::RotatedBox::containsBox ( const RotatedBox box,
double  toli = 0.0,
double  tole = 0.0 
) const [inline]

Returns true if this box contain the box passed as a parameter,up to tolerances.

Tolerances may be specified separately for inner and edge boxes.

Definition at line 205 of file RotatedBox.h.

References box(), and Go::MatrixXD< T, Dim >::frobeniusNorm().


The documentation for this class was generated from the following file:
Generated on Mon Jun 11 14:48:19 2007 for GoTools Core Library by  doxygen 1.5.1