X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgeometry%2Fbox.h;fp=source%2Fgeometry%2Fbox.h;h=bfcfa2f6e02dc343461375f64713563b57750020;hb=6ff13022b53830d35283905d562c2ef3af198cc1;hp=0000000000000000000000000000000000000000;hpb=ec9e0699ef686a3314d4c9ee0f39b29a92d3aeed;p=libs%2Fmath.git diff --git a/source/geometry/box.h b/source/geometry/box.h new file mode 100644 index 0000000..bfcfa2f --- /dev/null +++ b/source/geometry/box.h @@ -0,0 +1,26 @@ +#ifndef MSP_GEOMETRY_BOX_H_ +#define MSP_GEOMETRY_BOX_H_ + +#include +#include "hyperbox.h" + +namespace Msp { +namespace Geometry { + +template +class Box: public HyperBox +{ +public: + Box() { } + explicit Box(const LinAl::Vector &d): HyperBox(d) { } + Box(T w, T h, T d): HyperBox(LinAl::Vector3(w, h, d)) { } + + T get_width() const { return this->get_dimension(0); } + T get_height() const { return this->get_dimension(1); } + T get_depth() const { return this->get_dimension(2); } +}; + +} // namespace Geometry +} // namespace Msp + +#endif