#include <boundingbox.h>
Inheritance diagram for Boundary::BoundingEllipse< T, Boolean, Float, BoxType >:
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. |
|
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. |