#include <OSDLCircleBoundingBox.h>
Inheritance diagram for OSDL::Engine::CircleBoundingBox:
Definition at line 28 of file OSDLCircleBoundingBox.h.
Public Member Functions | |
CircleBoundingBox (Ceylan::Locatable2D &father, const Ceylan::Maths::Linear::Bipoint ¢er, Ceylan::Maths::Real radius) throw () | |
Constructor of a 2D circular bounding box object. | |
virtual | ~CircleBoundingBox () throw () |
Virtual destructor. | |
virtual Ceylan::Maths::Real | getRadius () const throw () |
Returns the radius of this circular bounding box. | |
virtual void | setRadius (Ceylan::Maths::Real newRadius) throw () |
Sets the radius of this circular bounding box. | |
virtual const std::string | toString (Ceylan::VerbosityLevels level=Ceylan::high) const throw () |
Returns an user-friendly description of the state of this object. | |
virtual IntersectionResult | doesIntersectWith (BoundingBox &other) throw ( BoundingBoxException ) |
Tells what is the nature of the intersection between this 2D bounding box and the specified one. | |
Static Public Member Functions | |
static std::string | InterpretIntersectionResult (IntersectionResult result) throw ( BoundingBoxException ) |
Returns a textual description of specified intersection result. | |
Protected Member Functions | |
virtual IntersectionResult | compareWith (CircleBoundingBox &other) throw () |
Helper method comparing two circular bounding boxes. | |
Static Protected Member Functions | |
static CircleBoundingBox & | CheckIsCircle (BoundingBox &box) throw (BoundingBoxException) |
Checks that specified bounding box is a circle (two-dimensional) one. | |
static BoundingBox2D & | CheckIs2D (BoundingBox &box) throw (BoundingBoxException) |
Checks that specified bounding box is a two-dimensional one. | |
Protected Attributes | |
Ceylan::Maths::Real | _radius |
Radius of the bounding box. | |
Private Member Functions | |
CircleBoundingBox (const CircleBoundingBox &source) throw () | |
Copy constructor made private to ensure that it will never be called. | |
CircleBoundingBox & | operator= (const CircleBoundingBox &source) throw () |
Assignment operator made private to ensure that it will never be called. |
OSDL::Engine::CircleBoundingBox::CircleBoundingBox | ( | Ceylan::Locatable2D & | father, | |
const Ceylan::Maths::Linear::Bipoint & | center, | |||
Ceylan::Maths::Real | radius | |||
) | throw () |
Constructor of a 2D circular bounding box object.
center | the center of the bounding box. | |
radius | the radius of the circle. |
CircleBoundingBox::~CircleBoundingBox | ( | ) | throw () [virtual] |
OSDL::Engine::CircleBoundingBox::CircleBoundingBox | ( | const CircleBoundingBox & | source | ) | throw () [explicit, private] |
Copy constructor made private to ensure that it will never be called.
The compiler should complain whenever this undefined constructor is called, implicitly or not.
Real CircleBoundingBox::getRadius | ( | ) | const throw () [virtual] |
Returns the radius of this circular bounding box.
Definition at line 46 of file OSDLCircleBoundingBox.cc.
References _radius.
virtual void OSDL::Engine::CircleBoundingBox::setRadius | ( | Ceylan::Maths::Real | newRadius | ) | throw () [virtual] |
Sets the radius of this circular bounding box.
newRadius | the new radius. |
const string CircleBoundingBox::toString | ( | Ceylan::VerbosityLevels | level = Ceylan::high |
) | const throw () [virtual] |
Returns an user-friendly description of the state of this object.
level | the requested verbosity level. |
Reimplemented from OSDL::Engine::BoundingBox2D.
Definition at line 58 of file OSDLCircleBoundingBox.cc.
References OSDL::Video::Pixels::toString().
IntersectionResult CircleBoundingBox::doesIntersectWith | ( | BoundingBox & | other | ) | throw ( BoundingBoxException ) [virtual] |
Tells what is the nature of the intersection between this 2D bounding box and the specified one.
Externally tangent circles (unique intersection) are not deemed intersecting.
Similarly, internally tangent circles (unique intersection) are deemed intersecting (no one is deemed stricly contained by the second).
other | the other 2D bounding box. |
BoundingBoxException | if the type of the two bounding boxes is not compatible (ex : 2D boxes cannot be checked against 3D boxes), or not implemented. |
Implements OSDL::Engine::BoundingBox.
Definition at line 75 of file OSDLCircleBoundingBox.cc.
References OSDL::Engine::BoundingBox2D::CheckIs2D().
IntersectionResult CircleBoundingBox::compareWith | ( | CircleBoundingBox & | other | ) | throw () [protected, virtual] |
Helper method comparing two circular bounding boxes.
other | the second bounding box to intersect with. |
Definition at line 101 of file OSDLCircleBoundingBox.cc.
References OSDL::Engine::contains, OSDL::Engine::intersects, OSDL::Engine::isContained, OSDL::Engine::isEqual, OSDL::Engine::isSeparate, OSDL_BOX_LOG, and OSDL::Video::Pixels::toString().
CircleBoundingBox & CircleBoundingBox::CheckIsCircle | ( | BoundingBox & | box | ) | throw (BoundingBoxException) [static, protected] |
Checks that specified bounding box is a circle (two-dimensional) one.
box | the bounding box to be checked. |
BoundingBoxException | if it is not a 2D circular bounding box. |
Definition at line 177 of file OSDLCircleBoundingBox.cc.
CircleBoundingBox& OSDL::Engine::CircleBoundingBox::operator= | ( | const CircleBoundingBox & | source | ) | throw () [private] |
Assignment operator made private to ensure that it will never be called.
The compiler should complain whenever this undefined operator is called, implicitly or not.
BoundingBox2D & BoundingBox2D::CheckIs2D | ( | BoundingBox & | box | ) | throw (BoundingBoxException) [static, protected, inherited] |
Checks that specified bounding box is a two-dimensional one.
box | the bounding box to be checked. |
BoundingBoxException | if it is not a 2D bounding box. |
Definition at line 37 of file OSDLBoundingBox2D.cc.
Referenced by doesIntersectWith().
string BoundingBox::InterpretIntersectionResult | ( | IntersectionResult | result | ) | throw ( BoundingBoxException ) [static, inherited] |
Returns a textual description of specified intersection result.
BoundingBoxException | if the intersection result is not known, and therefore cannot be interpreted. |
Definition at line 37 of file OSDLBoundingBox.cc.
References OSDL::Engine::contains, OSDL::Engine::intersects, OSDL::Engine::isContained, OSDL::Engine::isEqual, and OSDL::Engine::isSeparate.
Ceylan::Maths::Real OSDL::Engine::CircleBoundingBox::_radius [protected] |
Radius of the bounding box.
Definition at line 155 of file OSDLCircleBoundingBox.h.
Referenced by getRadius().