Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/collision_detection/obb.h @ 10232

Last change on this file since 10232 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
RevLine 
[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]13template<class T> class tList;
[4510]14
[4511]15//! A class representing an extended bounding volume tree: an obb tree
[4514]16class OBB : public BoundingVolume {
[9869]17  ObjectListDeclaration(OBB);
[4510]18
19 public:
[4511]20  OBB();
21  virtual ~OBB();
[4510]22
[4541]23
[7711]24  inline Vector getAxisX () const { return this->axis[0]; }
25  inline Vector getAxisY () const { return this->axis[1]; }
26  inline Vector getAxisZ () const { return this->axis[2]; }
27
[4576]28  inline const float* getHalfLength() const { return this->halfLength; }
[4510]29
[4531]30  virtual void mergeWith(const BoundingVolume &bv);
31
[4635]32  virtual void drawBV(int currentDepth, int drawMode) const;
[4531]33
34
[4702]35
[4557]36 public:
[7711]37  Vector           axis[3];                    //!< Axes of oriented box [x,y,z]
38  float            halfLength[3];              //!< Half lengths of the box along the axis
[4557]39  float            covarianceMatrix[3][3];     //!< the covariance matrix
[4521]40
[4814]41  bool             bCollided;                  //!< is true if this obb has collided
[4702]42
[4510]43};
44
[4511]45#endif /* _OBB_H */
Note: See TracBrowser for help on using the repository browser.