Open Source Tomb Raider Engine
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

BoundingVolume.h 779B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*!
  2. * \file include/BoundingVolume.h
  3. * \brief Bounding volume class for world/vis/culling/clipping/collision stuff.
  4. *
  5. * \author Mongoose
  6. */
  7. #ifndef _BOUNDINGVOLUME_H_
  8. #define _BOUNDINGVOLUME_H_
  9. #include "MatMath.h"
  10. /*!
  11. * \brief Defines a 3D sphere.
  12. */
  13. class BoundingSphere {
  14. public:
  15. vec3_t mCenter; //!< Center of bounding sphere
  16. vec_t mRadius; //!< Raduis of bounding sphere
  17. };
  18. /*!
  19. * \brief Defines a 3D rectangle.
  20. */
  21. class BoundingBox {
  22. public:
  23. vec3_t mMin; //!< Bounding box MIN point
  24. vec3_t mMax; //!< Bounding box MAX point
  25. };
  26. /*!
  27. * \brief Defines a 3D sphere and/or rectangle.
  28. */
  29. class BoundingVolume {
  30. public:
  31. BoundingSphere mSphere; //!< Bounding sphere of this volume
  32. BoundingBox mBox; //!< Bounding box of this volume
  33. };
  34. #endif