Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Boundary::AARBoundingBox< T, Boolean, Float, BoxType > Class Template Reference

#include <boundingbox.h>

Inheritance diagram for Boundary::AARBoundingBox< T, Boolean, Float, BoxType >:

Inheritance graph
[legend]
Collaboration diagram for Boundary::AARBoundingBox< T, Boolean, Float, BoxType >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class T = int, class Boolean = bool, class Float = double, class BoxType = AAArbitraryRectangle<T,Boolean,Float>>
class Boundary::AARBoundingBox< T, Boolean, Float, BoxType >

General-purpose axis-aligned rectangular bounding box.

Basically just a wrapper around the given BoxType using the virtual function interface of BoundingBox<>, which allows this class to be compatible with other bounding box classes.

Definition at line 81 of file boundingbox.h.

Public Methods

 AARBoundingBox ()
 Default constructor: infinite extent.

 AARBoundingBox (T xlow, T ylow, T xhigh, T yhigh)
 Typical constructor: square box.

 AARBoundingBox (T centerx, T centery, T radius)
 Constructor taking a center and a radius for a square box with odd dimensions.

virtual Boolean inside (T x, T y) const
 Whether the given point is enclosed by the box, inclusively.

virtual self & set ()
 Make the bounding box infinite.

virtual self & set (T xlow, T ylow, T xhigh, T yhigh)
 Set the bounding box to the given dimensions.

virtual self & operator+= (const self &b)
 Expand this box to enclose the given one.

virtual base & scale (T xscale, T yscale)
 Scale the size of the box in X and Y dimensions.

virtual base & rotate (Float theta)
 Rotate the box by the given angle (in radians) and take the smallest axis-aligned rectangle which encloses the result.

virtual base & translate (T xoffset, T yoffset)
 Translate the origin of the box elsewhere.

virtual base::Rectangle aarectangle () const
 Returns an axis-aligned rectangle fully enclosing this box, or an empty rectangle if no such finite rectangle exists.

virtual base * clone () const
 Constructs an identical copy of self and returns it.

virtual std::ostream & put (std::ostream &s) const
 Virtual interface to the operator<<, since << cannot be virtual.

virtual Boolean empty () const
 Enclosing a single point or line is considered empty since zero area is enclosed.


Protected Attributes

BoxType box


Member Function Documentation

template<class T = int, class Boolean = bool, class Float = double, class BoxType = AAArbitraryRectangle<T,Boolean,Float>>
virtual std::ostream& Boundary::AARBoundingBox< T, Boolean, Float, BoxType >::put std::ostream &    s const [inline, virtual]
 

Virtual interface to the operator<<, since << cannot be virtual.

This implementation is just a stub, and should be overriden in derived classes. Outputs a human-readable representation to the given stream.

Reimplemented from Boundary::BoundingBox< T, Boolean, Float >.

Definition at line 127 of file boundingbox.h.


The documentation for this class was generated from the following file:
Generated on Mon Jan 20 02:37:32 2003 for RF-LISSOM by doxygen1.3-rc2