OSDL::Engine::BoundingBox2D Class Reference

2D bounding boxes are specialized bounding boxes for objects in 2D space. More...

#include <OSDLBoundingBox2D.h>

Inheritance diagram for OSDL::Engine::BoundingBox2D:
Inheritance graph
[legend]
Collaboration diagram for OSDL::Engine::BoundingBox2D:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BoundingBox2D (Ceylan::Locatable2D &father, const Ceylan::Maths::Linear::Bipoint &center)
 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 BoundingBox2DCheckIs2D (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.
BoundingBox2Doperator= (const BoundingBox2D &source)
 Assignment operator made private to ensure that it will never be called.

Detailed Description

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.


Constructor & Destructor Documentation

OSDL::Engine::BoundingBox2D::BoundingBox2D ( Ceylan::Locatable2D &  father,
const Ceylan::Maths::Linear::Bipoint &  center 
) [explicit]

Constructor of a 2D bounding box object.

Parameters:
father the father Locatable2D the box is defined relatively to.
center the center of the 2D bounding box.
Note:
No indication of direction is given for the bounding box at this level, since for example circle box would not need it.
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.


Member Function Documentation

BoundingBox2D & BoundingBox2D::CheckIs2D ( BoundingBox box  )  [static, protected]

Checks that specified bounding box is a two-dimensional one.

Parameters:
box the bounding box to be checked.
Exceptions:
BoundingBoxException if it is not a 2D bounding box.
Returns:
the successfully casted 2D box.
Note:
Parameter should not be 'const' in order that method to be useful for its caller.

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.

Parameters:
other the other bounding box.
Returns:
the intersection result
Exceptions:
BoundingBoxException if the type of the two bounding boxes is not compatible (ex: 2D boxes cannot be checked against 3D boxes), or not implemented.
See also:
IntersectionResult
Note:
This method can be called for heterogenous (but compatible) bounding boxes types. For example, if it was implemented, circular and square (both being 2D boxes) could be searched for intersection.
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  )  [static, inherited]

Returns a textual description of specified intersection result.

Exceptions:
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.

Parameters:
level the requested verbosity level.
Note:
Text output format is determined from overall settings.
See also:
Ceylan::TextDisplayable

Reimplemented in OSDL::Engine::CircleBoundingBox.

Definition at line 57 of file OSDLBoundingBox2D.cc.


The documentation for this class was generated from the following files:
Generated on Mon Nov 29 14:05:33 2010 for OSDL by  doxygen 1.6.3