00001 #pragma once
00002 #ifndef BL7_G2_BOUNDINGVOLUME_H
00003 #define BL7_G2_BOUNDINGVOLUME_H
00004
00005 #include "../core.h"
00006
00007 #include <MathLabs/Vector2.h>
00008
00009
00010
00011 namespace bl7 {
00012 namespace geometry2 {
00013
00014
00015
00016 class AABB;
00017 class BoundingSphere;
00018
00019
00020
00028 class BODYLABS_API BoundingVolume
00029 {
00030 protected:
00031 virtual ~BoundingVolume(void) { }
00032
00033
00034
00035
00036
00037
00038 public:
00042 virtual bool overlaps(const AABB& aabb) const = 0;
00043
00047 virtual bool overlaps(const BoundingSphere& bs) const = 0;
00048
00049
00050
00051
00052
00053
00054 public:
00058 virtual bool contains(const ml7::Vector2& v) const = 0;
00059
00063 virtual bool contains(const AABB& aabb) const = 0;
00064
00068 virtual bool contains(const BoundingSphere& bs) const = 0;
00069
00070
00071
00072
00073
00074
00075 public:
00079 virtual BoundingVolume& include(const ml7::Vector2& v) = 0;
00080
00084 virtual BoundingVolume& include(const AABB& aabb) = 0;
00085
00089 virtual BoundingVolume& include(const BoundingSphere& bs) = 0;
00090
00091 };
00092
00093
00094
00095 }
00096 }
00097
00098 #endif // BL7_G2_BOUNDINGVOLUME_H