From 4ce3ce22c5d50dd3bd92223e43182d4efdfe4ef8 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 13 Jun 2016 09:28:26 +0200 Subject: api/simple-mat: allow for vector -> const double* conversion --- opentrack/simple-mat.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'opentrack') diff --git a/opentrack/simple-mat.hpp b/opentrack/simple-mat.hpp index 864f0e49..2855ad0e 100644 --- a/opentrack/simple-mat.hpp +++ b/opentrack/simple-mat.hpp @@ -206,6 +206,14 @@ public: Mat(num* mem) : Mat(const_cast(mem)) {} + template::type> + operator const double*() const + { + return reinterpret_cast(data); + } + // XXX add more operators as needed, third-party dependencies mostly // not needed merely for matrix algebra -sh 20141030 -- cgit v1.2.3