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

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

#include <boundingbox.h>

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

Inheritance graph
[legend]
Collaboration diagram for Boundary::BoundingEllipse< 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::BoundingEllipse< T, Boolean, Float, BoxType >

General-purpose ellipsoidal bounding box.

For simplicity, this is just a minor variation on AARBoundingBox, but if speed is important it can be made a fully-separate class instead so that it can cache the values of the parameters needed by inside().

To allow an arbitrary radius to be used even for an integer-bounded box, a "trim" value can be passed in; this will be added to the integer radius to get the floating-point radius. This somewhat- unorthodox implementation was chosen not because it's better than just using a floating-point radius in the first place, but because it made it easier to interface with older code structured in the same way.

Definition at line 158 of file boundingbox.h.

Public Methods

 BoundingEllipse ()
 Default constructor: infinite extent.

 BoundingEllipse (T centerx, T centery, T radius, Float trim=0)
 Constructor for a circular area.

 BoundingEllipse (T centerx, T centery, T radiusx, T radiusy, Float trimx_i=0, Float trimy_i=0)
 Constructor for an ellipsoidal area.

virtual Boolean inside (T x, T y) const
 Returns true if the given coordinates are inside the ellipse bounded by the corresponding rectangle.

virtual base & rotate (Float theta)
 Rotate the box by the given angle (in radians).

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


Member Function Documentation

template<class T = int, class Boolean = bool, class Float = double, class BoxType = AAArbitraryRectangle<T,Boolean,Float>>
virtual base& Boundary::BoundingEllipse< T, Boolean, Float, BoxType >::rotate Float    theta [inline, virtual]
 

Rotate the box by the given angle (in radians).

Not implemented.

Reimplemented from Boundary::AARBoundingBox< T, Boolean, Float, BoxType >.

Definition at line 200 of file boundingbox.h.


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