Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/util/collision_detection/bounding_volume.h @ 4520

Last change on this file since 4520 was 4520, checked in by patrick, 19 years ago

orxonox/trunk: implemented bv, collision, and added a global cd defs file

File size: 925 bytes
Line 
1/*!
2    \file bounding_volume.h
3    \brief Definition of a bounding volume for collision detection algorithms
4
5*/
6
7#ifndef _BOUNDING_VOLUME_H
8#define _BOUNDING_VOLUME_H
9
10#include "base_object.h"
11
12class sVect3D;
13class Vector;
14
15//! An abstract class representing a bounding volume
16class BoundingVolume : public BaseObject {
17
18 public:
19  BoundingVolume();
20  virtual ~BoundingVolume();
21
22  inline const Vector* getCenter() const { return this->center; }
23  inline const Vector* getAxis () const { return this->axis; }
24  inline const sVect3D* getHalfLength() const { return this->halfLength; } 
25
26  sVect3D* getVertices() const;
27  void mergeWith(const BoundingVolume& bv);
28
29 private:
30  Vector*    center;                     //!< Center point of box
31  Vector*    axis;                       //!< Axes of oriented box [x,y,z]
32  sVect3D*   halfLength;                 //!< Half lengths of the box
33
34
35};
36
37#endif /* _BOUNDING_VOLUME_H */
Note: See TracBrowser for help on using the repository browser.