Browse Source

Bring Math::Geometry::Rectangle to Magnum namespace.

pull/7/head
Vladimír Vondruš 14 years ago
parent
commit
423beaebeb
  1. 12
      src/Magnum.h
  2. 1
      src/Math/Geometry/Rectangle.h

12
src/Magnum.h

@ -66,7 +66,11 @@ namespace Math {
template<class T> constexpr T deg(T value);
template<class T> constexpr T rad(T value);
template<class T> struct Constants;
template<class T> class Constants;
namespace Geometry {
template<class> class Rectangle;
}
}
/* Bring debugging facility from Corrade::Utility namespace */
@ -117,6 +121,12 @@ typedef Math::Matrix4<GLfloat> Matrix4;
/* Using float instead of GLfloat to not break KDevelop autocompletion */
typedef Math::Constants<float> Constants;
/** @brief Floating-point rectangle */
typedef Math::Geometry::Rectangle<GLfloat> Rectangle;
/** @brief Integer rectangle */
typedef Math::Geometry::Rectangle<GLint> Rectanglei;
/* Copying angle converters from Math namespace */
using Math::deg;
using Math::rad;

1
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 T> class Rectangle {
public:

Loading…
Cancel
Save