* mln/algebra/quat.hh: add implicit conversion operator to
algebra::vec.
---
milena/ChangeLog | 7 +++++++
milena/mln/algebra/quat.hh | 8 ++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 4efb183..5c7fdf4 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,12 @@
2009-02-20 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Add implicit conversion from algebra::quat to algebra::vec.
+
+ * mln/algebra/quat.hh: add implicit conversion operator to
+ algebra::vec.
+
+2009-02-20 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Update ICP.
* mln/registration/icp.hh: store point indexes instead of points in
diff --git a/milena/mln/algebra/quat.hh b/milena/mln/algebra/quat.hh
index 33e7d07..85ebcbd 100644
--- a/milena/mln/algebra/quat.hh
+++ b/milena/mln/algebra/quat.hh
@@ -162,6 +162,8 @@ namespace mln
/// Explicit conversion to a 4D algebra::vec.
const algebra::vec<4,float>& to_vec() const;
+ /// Implicit conversion to a 4D algebra::vec.
+ operator const algebra::vec<4,float>&() const;
/// Give the scalar part.
float s() const;
@@ -340,6 +342,12 @@ namespace mln
}
inline
+ quat::operator const algebra::vec<4,float>&() const
+ {
+ return this->v_;
+ }
+
+ inline
float
quat::s() const
{
--
1.5.6.5
Show replies by date