source:
orxonox.OLD/orxonox/trunk/src/lib/collision_detection/obb.h
@
5067
Last change on this file since 5067 was 5039, checked in by bensch, 19 years ago | |
---|---|
File size: 959 bytes |
Rev | Line | |
---|---|---|
[4576] | 1 | /*! |
[5039] | 2 | * @file obb.h |
[4836] | 3 | * Definition of an OBB (object Oriented Bounding Box) |
[4510] | 4 | |
5 | */ | |
6 | ||
[4511] | 7 | #ifndef _OBB_H |
8 | #define _OBB_H | |
[4510] | 9 | |
10 | #include "base_object.h" | |
[4514] | 11 | #include "bounding_volume.h" |
[4510] | 12 | |
[4541] | 13 | template<class T> class tList; |
[4510] | 14 | |
[4511] | 15 | //! A class representing an extended bounding volume tree: an obb tree |
[4514] | 16 | class OBB : public BoundingVolume { |
[4510] | 17 | |
18 | public: | |
[4511] | 19 | OBB(); |
20 | virtual ~OBB(); | |
[4510] | 21 | |
[4541] | 22 | |
[4660] | 23 | inline Vector* getAxis () const { return this->axis; } |
[4576] | 24 | inline const float* getHalfLength() const { return this->halfLength; } |
[4510] | 25 | |
[4531] | 26 | virtual void mergeWith(const BoundingVolume &bv); |
27 | ||
[4635] | 28 | virtual void drawBV(int currentDepth, int drawMode) const; |
[4531] | 29 | |
30 | ||
[4702] | 31 | |
[4557] | 32 | public: |
[4660] | 33 | Vector* axis; //!< Axes of oriented box [x,y,z] |
[4557] | 34 | float* halfLength; //!< Half lengths of the box along the axis |
35 | float covarianceMatrix[3][3]; //!< the covariance matrix | |
[4521] | 36 | |
[4814] | 37 | bool bCollided; //!< is true if this obb has collided |
[4702] | 38 | |
[4510] | 39 | }; |
40 | ||
[4511] | 41 | #endif /* _OBB_H */ |
Note: See TracBrowser
for help on using the repository browser.