]> git.tdb.fi Git - libs/math.git/blob - source/geometry/shape.h
Beginnings of a geometry library
[libs/math.git] / source / geometry / shape.h
1 #ifndef MSP_GEOMETRY_SHAPE_H_
2 #define MSP_GEOMETRY_SHAPE_H_
3
4 namespace Msp {
5 namespace Geometry {
6
7 template<typename T, unsigned D>
8 class HyperBox;
9
10 template<typename T, unsigned D>
11 class Ray;
12
13 template<typename T, unsigned D>
14 class Shape
15 {
16 protected:
17         Shape() { }
18 public:
19         virtual ~Shape() { }
20
21         virtual Shape *clone() const = 0;
22
23         virtual HyperBox<T, D> get_axis_aligned_bounding_box() const = 0;
24         virtual bool check_intersection(const Ray<T, D> &) const = 0;
25 };
26
27 } // namespace Geometry
28 } // namespace Msp
29
30 #endif