Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/heathaze/src/lib/collision_detection/aabb.h

Last change on this file was 9869, checked in by bensch, 18 years ago

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

File size: 1.1 KB
Line 
1/*!
2 * @file aabb.h
3  *  Definition of an AABB (Axix Aligned Bounding Box)
4
5*/
6
7#ifndef _AABB_H
8#define _AABB_H
9
10#include "base_object.h"
11#include "bounding_volume.h"
12
13//! A class representing an extended bounding volume tree: an obb tree
14class AABB : public BoundingVolume {
15  ObjectListDeclaration(AABB);
16
17 public:
18  AABB();
19  virtual ~AABB();
20
21
22  inline Vector getAxisX () const { return this->axis[0]; }
23  inline Vector getAxisY () const { return this->axis[1]; }
24  inline Vector getAxisZ () const { return this->axis[2]; }
25
26  inline const float* getHalfLength() const { return this->halfLength; }
27
28  virtual void mergeWith(const BoundingVolume &bv);
29
30  virtual void drawBV(int currentDepth, int drawMode) const;
31
32
33
34 public:
35  Vector           axis[3];                    //!< Axes of oriented box [x,y,z]
36  float            halfLength[3];              //!< Half lengths of the box along the axis
37  float            covarianceMatrix[3][3];     //!< the covariance matrix
38
39  bool             bCollided;                  //!< is true if this obb has collided
40
41};
42
43#endif /* _AABB_H */
Note: See TracBrowser for help on using the repository browser.