2D bounding boxes are specialized bounding boxes for objects in 2D space. More...
#include <OSDLBoundingBox2D.h>
Public Member Functions | |
BoundingBox2D (Ceylan::Locatable2D &father, const Ceylan::Maths::Linear::Bipoint ¢er) | |
Constructor of a 2D bounding box object. | |
virtual | ~BoundingBox2D () throw () |
Virtual destructor. | |
virtual const std::string | toString (Ceylan::VerbosityLevels level=Ceylan::high) const |
Returns an user-friendly description of the state of this object. | |
virtual IntersectionResult | doesIntersectWith (BoundingBox &other)=0 |
Tells what is the nature of the intersection between this bounding box and the specified one. | |
Static Public Member Functions | |
static std::string | InterpretIntersectionResult (IntersectionResult result) |
Returns a textual description of specified intersection result. | |
Static Protected Member Functions | |
static BoundingBox2D & | CheckIs2D (BoundingBox &box) |
Checks that specified bounding box is a two-dimensional one. | |
Private Member Functions | |
BoundingBox2D (const BoundingBox2D &source) | |
Copy constructor made private to ensure that it will never be called. | |
BoundingBox2D & | operator= (const BoundingBox2D &source) |
Assignment operator made private to ensure that it will never be called. |
2D bounding boxes are specialized bounding boxes for objects in 2D space.
They are locatable in 2D space, therefore are Locatable2D.
It implies they own a 3x3 homogeneous matrix, which fully defines their position and angles in 2D space, relatively to a father Locatable.
Their father Locatable can be either a Model, of View or another bounding box.
Definition at line 66 of file OSDLBoundingBox2D.h.
OSDL::Engine::BoundingBox2D::BoundingBox2D | ( | Ceylan::Locatable2D & | father, | |
const Ceylan::Maths::Linear::Bipoint & | center | |||
) | [explicit] |
Constructor of a 2D bounding box object.
father | the father Locatable2D the box is defined relatively to. | |
center | the center of the 2D bounding box. |
BoundingBox2D::~BoundingBox2D | ( | ) | throw () [virtual] |
Virtual destructor.
Definition at line 50 of file OSDLBoundingBox2D.cc.
OSDL::Engine::BoundingBox2D::BoundingBox2D | ( | const BoundingBox2D & | source | ) | [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.
BoundingBox2D & BoundingBox2D::CheckIs2D | ( | BoundingBox & | box | ) | [static, protected] |
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 68 of file OSDLBoundingBox2D.cc.
Referenced by OSDL::Engine::CircleBoundingBox::doesIntersectWith().
virtual IntersectionResult OSDL::Engine::BoundingBox::doesIntersectWith | ( | BoundingBox & | other | ) | [pure virtual, inherited] |
Tells what is the nature of the intersection between this bounding box and the specified one.
other | the other 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. |
Implemented in OSDL::Engine::CircleBoundingBox.
string BoundingBox::InterpretIntersectionResult | ( | IntersectionResult | result | ) | [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 68 of file OSDLBoundingBox.cc.
References OSDL::Engine::contains, OSDL::Engine::intersects, OSDL::Engine::isContained, OSDL::Engine::isEqual, and OSDL::Engine::isSeparate.
BoundingBox2D& OSDL::Engine::BoundingBox2D::operator= | ( | const BoundingBox2D & | source | ) | [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.
const string BoundingBox2D::toString | ( | Ceylan::VerbosityLevels | level = Ceylan::high |
) | const [virtual] |
Returns an user-friendly description of the state of this object.
level | the requested verbosity level. |
Reimplemented in OSDL::Engine::CircleBoundingBox.
Definition at line 57 of file OSDLBoundingBox2D.cc.