#include <Bounding_Box.h>
Public Member Functions | |
virtual | ~Bounding_Box () |
virtual unsigned int | getDimension () const=0 |
virtual void | become (const bb_type *bb)=0 |
virtual bool | lineIntersect (const vector< double > &start, const vector< double > &end) const=0 |
virtual bool | intersects (const bb_type &x) const =0 |
virtual bool | contains (const Point &x) const =0 |
virtual bool | contains (const bb_type &other) const=0 |
virtual bb_type | unionWith (const bb_type &other) const=0 |
virtual void | unite (const bb_type *other)=0 |
virtual bb_type | intersect (const bb_type &other) const=0 |
virtual bool | isEmpty () const=0 |
virtual string | toString () const=0 |
virtual void | clear ()=0 |
virtual void | writeToFile (ofstream &ofs) const =0 |
virtual void | getCenterCoordinate (vector< double > *into) const=0 |
virtual bool | isDefining (bb_type *other) const =0 |
Bounding_Box () | |
Bounding_Box (bb_type *bb) | |
Static Public Member Functions | |
static Ordering< bb_type > * | getDefaultOrdering () |
static vector< Ordering< bb_type > * > | getOrderings () |
Definition at line 25 of file Bounding_Box.h.
virtual Bounding_Box< bb_type >::~Bounding_Box | ( | ) | [inline, virtual] |
Base deconstructor. Does nothing.
Definition at line 53 of file Bounding_Box.h.
Bounding_Box< bb_type >::Bounding_Box | ( | ) | [inline] |
Base constructor. Does nothing.
Definition at line 179 of file Bounding_Box.h.
Bounding_Box< bb_type >::Bounding_Box | ( | bb_type * | bb | ) | [inline] |
Copy constructor.
bb | Pointer to the bounding box to be copied. |
Definition at line 186 of file Bounding_Box.h.
static Ordering< bb_type >* Bounding_Box< bb_type >::getDefaultOrdering | ( | ) | [inline, static] |
Function which returns the default ordering used on this type of bounding box.
Reimplemented in Cubic_Bounding_Box, and Cubic_Bounding_Box_Container.
Definition at line 40 of file Bounding_Box.h.
static vector< Ordering< bb_type > * > Bounding_Box< bb_type >::getOrderings | ( | ) | [inline, static] |
Function which returns all orderings defined on this type of bounding box.
Reimplemented in Cubic_Bounding_Box, and Cubic_Bounding_Box_Container.
Definition at line 50 of file Bounding_Box.h.
virtual unsigned int Bounding_Box< bb_type >::getDimension | ( | ) | const [pure virtual] |
Gets the dimension of the current bounding box. Since this may be calculated or stored differently depending on the type of bounding box, this method is defined purely virtual.
Implemented in Cubic_Bounding_Box.
virtual void Bounding_Box< bb_type >::become | ( | const bb_type * | bb | ) | [pure virtual] |
Become equal to a given other bounding box of the same type. Since we do not know any specifics about the exact (non-abstract) type of the bounding box to be copied, this method is defined purely virtual.
bb | A pointer to the bounding box to which the current bounding box has to become equal to. |
Implemented in Cubic_Bounding_Box.
virtual bool Bounding_Box< bb_type >::lineIntersect | ( | const vector< double > & | start, | |
const vector< double > & | end | |||
) | const [pure virtual] |
Function which checks for intersection with a line segment defined by two coordinates. Since the algorithm needed to do this of course will depend on the exact type of bounding box, this function is declared purely virtual.
start | Pointer to the starting coordinate of the line segment. | |
end | Pointer to the ending coordinate of the line segment. |
Implemented in Cubic_Bounding_Box.
virtual bool Bounding_Box< bb_type >::intersects | ( | const bb_type & | x | ) | const [pure virtual] |
Function which checks for intersection with another bounding box of the same type.
x | A pointer to the other bounding box to check for intersection with. |
Implemented in Cubic_Bounding_Box.
virtual bool Bounding_Box< bb_type >::contains | ( | const Point & | x | ) | const [pure virtual] |
Function which checks if a given point is contained within the current bounding box.
x | A pointer to the point to check for. |
Implemented in Cubic_Bounding_Box.
virtual bool Bounding_Box< bb_type >::contains | ( | const bb_type & | other | ) | const [pure virtual] |
Function which checks if a given other bounding box of the same type is contained *entirely* within this bounding box.
other | A pointer to the bounding box to check for. |
Implemented in Cubic_Bounding_Box.
virtual bb_type Bounding_Box< bb_type >::unionWith | ( | const bb_type & | other | ) | const [pure virtual] |
Function which unites two bounding boxes of the same type.
other | A pointer to the other bounding box to unite the current one with. |
Implemented in Cubic_Bounding_Box.
virtual void Bounding_Box< bb_type >::unite | ( | const bb_type * | other | ) | [pure virtual] |
Function which unites the current bounding box with a given bounding box of the same time.
Note that, unlike unionWith, this method updates the current bounding box.
other | A pointer to the other bounding box to unite the current one with. |
Implemented in Cubic_Bounding_Box.
virtual bb_type Bounding_Box< bb_type >::intersect | ( | const bb_type & | other | ) | const [pure virtual] |
Function which returns the intersection of two bounding boxes.
other | Pointer to the other bounding box to intersect with. |
Implemented in Cubic_Bounding_Box.
virtual bool Bounding_Box< bb_type >::isEmpty | ( | ) | const [pure virtual] |
Function used to check if the current bounding box is empty, or rather, uninitialised.
Implemented in Cubic_Bounding_Box.
virtual string Bounding_Box< bb_type >::toString | ( | ) | const [pure virtual] |
Returns a string representation of the current bounding box.
Implemented in Cubic_Bounding_Box.
virtual void Bounding_Box< bb_type >::clear | ( | ) | [pure virtual] |
Clears and sets empty the current bounding box.
Implemented in Cubic_Bounding_Box.
virtual void Bounding_Box< bb_type >::writeToFile | ( | ofstream & | ofs | ) | const [pure virtual] |
Method to write (serialise) the bounding box in ASCII format to a given output stream.
ofs | Reference to the output stream. |
Implemented in Cubic_Bounding_Box, and Cubic_Bounding_Box_Container.
virtual void Bounding_Box< bb_type >::getCenterCoordinate | ( | vector< double > * | into | ) | const [pure virtual] |
Gets the center coordinate of this bounding box.
into | Pointer to where the center coordinate is to be stored. |
Implemented in Cubic_Bounding_Box.
virtual bool Bounding_Box< bb_type >::isDefining | ( | bb_type * | other | ) | const [pure virtual] |
Returns whether a given BB is defining for the current BB, assuming the current BB is the MBR of some set. With defining, we mean that the MBR of a set S would change if x in S is left out. I.e., x in S is defining for MBR(S) iff MBR(S) is not equal to MBR(S \ {x}).
other | The MBR to compare to (MBR(S) in the above). |
Implemented in Cubic_Bounding_Box.