/*! * @file bounding_volume.h * Definition of a bounding volume for collision detection algorithms */ #ifndef _BOUNDING_VOLUME_H #define _BOUNDING_VOLUME_H #include "base_object.h" #include "abstract_model.h" template class tList; //! An abstract class representing a bounding volume class BoundingVolume : public BaseObject { public: BoundingVolume(); virtual ~BoundingVolume(); inline const Vector& getCenter() const { return this->center; } const sVec3D* getVertices() const { return this->vertices; } virtual void mergeWith(const BoundingVolume &bv) = 0; virtual void drawBV(int currentDepth, int drawMode) const = 0; public: Vector center; //!< Center point of box const sVec3D* vertices; //!< if CD_STORE_VERTICES enabled, this is the place, where the vert. will be sotred int numOfVertices; //!< number of vertices in the vertices buffer const modelInfo* modelInf; //!< Reference to the model's ModelInfo const int* triangleIndexes; //!< Array with the triangle indexes in modelInfo unsigned int numTriangles; //!< Number of triangles in this BV }; #endif /* _BOUNDING_VOLUME_H */