#include <OSDLBoundingBox2D.h>
Inheritance diagram for OSDL::Engine::BoundingBox2D:
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 38 of file OSDLBoundingBox2D.h.
Public Member Functions | |
BoundingBox2D (Ceylan::Locatable2D &father, const Ceylan::Maths::Linear::Bipoint ¢er) throw () | |
Constructor of a 2D bounding box object. | |
virtual | ~BoundingBox2D () throw () |
Virtual destructor. | |
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)=0 throw ( BoundingBoxException ) |
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) throw ( BoundingBoxException ) |
Returns a textual description of specified intersection result. | |
Static Protected Member Functions | |
static BoundingBox2D & | CheckIs2D (BoundingBox &box) throw (BoundingBoxException) |
Checks that specified bounding box is a two-dimensional one. | |
Private Member Functions | |
BoundingBox2D (const BoundingBox2D &source) throw () | |
Copy constructor made private to ensure that it will never be called. | |
BoundingBox2D & | operator= (const BoundingBox2D &source) throw () |
Assignment operator made private to ensure that it will never be called. |
OSDL::Engine::BoundingBox2D::BoundingBox2D | ( | Ceylan::Locatable2D & | father, | |
const Ceylan::Maths::Linear::Bipoint & | center | |||
) | throw () [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] |
OSDL::Engine::BoundingBox2D::BoundingBox2D | ( | const BoundingBox2D & | 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.
const string BoundingBox2D::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 in OSDL::Engine::CircleBoundingBox.
Definition at line 26 of file OSDLBoundingBox2D.cc.
References OSDL::Video::Pixels::toString().
BoundingBox2D & BoundingBox2D::CheckIs2D | ( | BoundingBox & | box | ) | throw (BoundingBoxException) [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 37 of file OSDLBoundingBox2D.cc.
Referenced by OSDL::Engine::CircleBoundingBox::doesIntersectWith().
BoundingBox2D& OSDL::Engine::BoundingBox2D::operator= | ( | const BoundingBox2D & | 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.
virtual IntersectionResult OSDL::Engine::BoundingBox::doesIntersectWith | ( | BoundingBox & | other | ) | throw ( BoundingBoxException ) [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. |
Parameter cannot be 'const' since a referential change may have to happen to compare the boxes.
Implemented in OSDL::Engine::CircleBoundingBox.
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.