From 423beaebebebf405cdd4372e4e00c40817d86c52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 22 Dec 2012 02:45:46 +0100 Subject: [PATCH] Bring Math::Geometry::Rectangle to Magnum namespace. --- src/Magnum.h | 12 +++++++++++- src/Math/Geometry/Rectangle.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Magnum.h b/src/Magnum.h index b4af2f8a3..7123b40f7 100644 --- a/src/Magnum.h +++ b/src/Magnum.h @@ -66,7 +66,11 @@ namespace Math { template constexpr T deg(T value); template constexpr T rad(T value); - template struct Constants; + template class Constants; + + namespace Geometry { + template class Rectangle; + } } /* Bring debugging facility from Corrade::Utility namespace */ @@ -117,6 +121,12 @@ typedef Math::Matrix4 Matrix4; /* Using float instead of GLfloat to not break KDevelop autocompletion */ typedef Math::Constants Constants; +/** @brief Floating-point rectangle */ +typedef Math::Geometry::Rectangle Rectangle; + +/** @brief Integer rectangle */ +typedef Math::Geometry::Rectangle Rectanglei; + /* Copying angle converters from Math namespace */ using Math::deg; using Math::rad; diff --git a/src/Math/Geometry/Rectangle.h b/src/Math/Geometry/Rectangle.h index f8eac6511..a8bda2d1c 100644 --- a/src/Math/Geometry/Rectangle.h +++ b/src/Math/Geometry/Rectangle.h @@ -29,6 +29,7 @@ namespace Magnum { namespace Math { namespace Geometry { Helper class for storing axis-aligned rectangles consisting of bottom left and top right corner positions. Bottom left position is inclusive, while top right position is exclusive. +@see Magnum::Rectanglei */ template class Rectangle { public: