]> git.tdb.fi Git - libs/math.git/blob - source/geometry/box.h
40f88dc4412bb805159fd72197f9c6406a43106b
[libs/math.git] / source / geometry / box.h
1 #ifndef MSP_GEOMETRY_BOX_H_
2 #define MSP_GEOMETRY_BOX_H_
3
4 #include "hyperbox.h"
5
6 namespace Msp {
7 namespace Geometry {
8
9 template<typename T>
10 class Box: public HyperBox<T, 3>
11 {
12 public:
13         Box() { }
14         explicit Box(const LinAl::Vector<T, 3> &d): HyperBox<T, 3>(d) { }
15         Box(T w, T h, T d): HyperBox<T, 3>(LinAl::Vector<T, 3>(w, h, d)) { }
16
17         T get_width() const { return this->get_dimension(0); }
18         T get_height() const { return this->get_dimension(1); }
19         T get_depth() const { return this->get_dimension(2); }
20 };
21
22 } // namespace Geometry
23 } // namespace Msp
24
25 #endif