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

Boundary::AAArbitraryRectangle< T, Boolean, Float > Class Template Reference

#include <aarectangle.h>

Collaboration diagram for Boundary::AAArbitraryRectangle< T, Boolean, Float >:

Collaboration graph
[legend]
List of all members.

Detailed Description

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

General-purpose axis-aligned rectangle, identical to AARectangle<> except that it also allows boxes to be infinite.

Definition at line 166 of file aarectangle.h.

Public Types

typedef T value_type

Public Methods

 AAArbitraryRectangle ()
 Default constructor: infinite extent.

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

Boolean isinfinite () const
Boolean inside (T x, T y) const
Boolean upperexclusive_inside (T x, T y) const
self & set ()
 Make the bounding box infinite.

self & set (T xlow, T ylow, T xhigh, T yhigh)
self & operator+= (const self &b)
 Expand this box to enclose the given one.

self & scale (T xscale, T yscale)
 Multiply the size times the indicated amounts in each dimension.

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

self & translate (T xoffset, T yoffset)
 Translate the position by the indicated amounts.

std::ostream & put (std::ostream &s) const
 Output a human-readable representation to the given stream.

self & intersection (const self &o)
height () const
 The height of the rectangle, assuming inclusive bounds, or zero if infinite.

width () const
 The width of the rectangle, assuming inclusive bounds, or zero if infinite.

PlainRect aarectangle () const
 Discouraged: returns a plain axis-aligned rectangle, which is empty if this rectangle is infinite.

Points corners () const
 Discouraged: returns the points making up the corners of the box.

Boolean empty () const
 Regardless of whether the corners are exclusive or inclusive, enclosing a single point or line is always considered empty since zero area is enclosed.


Member Function Documentation

template<class T = int, class Boolean = bool, class Float = double>
self& Boundary::AAArbitraryRectangle< T, Boolean, Float >::operator+= const self &    b [inline]
 

Expand this box to enclose the given one.

An infinite box already encloses all boxes, while an empty() box will enclose any other box exactly, regardless of the original location of the empty rect.

Definition at line 203 of file aarectangle.h.


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