From 16eb32740b28b80a915fc9a681991bcfd687a10f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 29 Jun 2014 09:19:40 +0200 Subject: [PATCH] Math: added Range::data(). The main side-effect of this is that the data layout is now really specified, making it useful for various glGet*(GL_*_RANGE) calls. --- src/Magnum/Math/Range.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Magnum/Math/Range.h b/src/Magnum/Math/Range.h index 8f6c45b1a..2c4404326 100644 --- a/src/Magnum/Math/Range.h +++ b/src/Magnum/Math/Range.h @@ -103,6 +103,13 @@ template class Range { return !operator==(other); } + /** + * @brief Raw data + * @return One-dimensional array of `dimensions`*2 length. + */ + T* data() { return _min.data(); } + constexpr const T* data() const { return _min.data(); } /**< @overload */ + /** * @brief Minimal coordinates (inclusive) *