source:
orxonox.OLD/trunk/src/lib/collision_detection/bounding_volume.h
@
10432
Last change on this file since 10432 was 9869, checked in by bensch, 18 years ago | |
---|---|
File size: 1.3 KB |
Rev | Line | |
---|---|---|
[4588] | 1 | /*! |
[5039] | 2 | * @file bounding_volume.h |
[4836] | 3 | * Definition of a bounding volume for collision detection algorithms |
[4510] | 4 | |
[4616] | 5 | */ |
[4510] | 6 | |
[4511] | 7 | #ifndef _BOUNDING_VOLUME_H |
8 | #define _BOUNDING_VOLUME_H | |
[4510] | 9 | |
10 | #include "base_object.h" | |
[6022] | 11 | #include "model.h" |
[4510] | 12 | |
[7711] | 13 | |
[4541] | 14 | template<class T> class tList; |
[4510] | 15 | |
[4541] | 16 | |
[4511] | 17 | //! An abstract class representing a bounding volume |
18 | class BoundingVolume : public BaseObject { | |
[9869] | 19 | ObjectListDeclaration(BoundingVolume); |
[4510] | 20 | |
[4616] | 21 | public: |
22 | BoundingVolume(); | |
23 | virtual ~BoundingVolume(); | |
[4510] | 24 | |
[7711] | 25 | inline const Vector& getCenter() const { return this->center; } |
26 | inline const modelInfo* getModelInfo() const { return this->modelInf; } | |
[4510] | 27 | |
[5279] | 28 | virtual void mergeWith(const BoundingVolume &bv) = 0; |
[4520] | 29 | |
[5279] | 30 | virtual void drawBV(int currentDepth, int drawMode) const = 0; |
[4521] | 31 | |
[4525] | 32 | |
[4635] | 33 | |
[4616] | 34 | public: |
[7711] | 35 | Vector center; //!< Weighter average center point of box |
36 | Vector arithCenter; //!< Arithmetical center of the box | |
[4510] | 37 | |
[7711] | 38 | const modelInfo* modelInf; //!< Reference to the model's ModelInfo |
39 | const int* triangleIndexes; //!< Array with the triangle indexes in modelInfo | |
40 | int triangleIndexesLength; //!< length of the indexes array | |
[9008] | 41 | |
42 | float radius; //!< the radius of the box (longest axis) | |
[4510] | 43 | }; |
44 | ||
[4511] | 45 | #endif /* _BOUNDING_VOLUME_H */ |
Note: See TracBrowser
for help on using the repository browser.