/*! \file obb.h \brief Definition of an OBB (object Oriented Bounding Box) */ #ifndef _OBB_H #define _OBB_H #include "base_object.h" #include "bounding_volume.h" template class tList; //! A class representing an extended bounding volume tree: an obb tree class OBB : public BoundingVolume { public: OBB(); virtual ~OBB(); inline const Vector* getAxis () const { return this->axis; } inline const sVect3D* getHalfLength() const { return this->halfLength; } virtual tList* getVertices() const { return this->verticesBuffer; } virtual void mergeWith(const BoundingVolume &bv); virtual void drawBV(int currentDepth, const int depth) const; virtual void drawBVPolygon(int currentDepth, const int depth) const; virtual void drawBVBlended(int currentDepth, const int depth) const; public: Vector* axis; //!< Axes of oriented box [x,y,z] float* halfLength; //!< Half lengths of the box along the axis float covarianceMatrix[3][3]; //!< the covariance matrix }; #endif /* _OBB_H */