Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/proxy/src/lib/collision_detection/bounding_volume.h @ 9364

Last change on this file since 9364 was 9008, checked in by bensch, 18 years ago

orxonox/trunk: merged the network bak to the trunk
merged with command:
svn merge -r8804:HEAD https://svn.orxonox.net/orxonox/branches/multi_player_map .

conflicts all resolved in favour of the branche

File size: 1.3 KB
Line 
1/*!
2 * @file bounding_volume.h
3  *  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#include "model.h"
12
13
14template<class T> class tList;
15
16
17//! An abstract class representing a bounding volume
18class BoundingVolume : public BaseObject {
19
20  public:
21    BoundingVolume();
22    virtual ~BoundingVolume();
23
24    inline const Vector& getCenter() const { return this->center; }
25    inline const modelInfo* getModelInfo() const { return this->modelInf; }
26
27    virtual void mergeWith(const BoundingVolume &bv) = 0;
28
29    virtual void drawBV(int currentDepth, int drawMode) const = 0;
30
31
32
33  public:
34    Vector              center;                     //!< Weighter average center point of box
35    Vector              arithCenter;                //!< Arithmetical center of the box
36
37    const modelInfo*    modelInf;                   //!< Reference to the model's ModelInfo
38    const int*          triangleIndexes;            //!< Array with the triangle indexes in modelInfo
39    int                 triangleIndexesLength;      //!< length of the indexes array
40
41    float               radius;                     //!< the radius of the box (longest axis)
42};
43
44#endif /* _BOUNDING_VOLUME_H */
Note: See TracBrowser for help on using the repository browser.