From 4393f20fea79bb176fc5658bd6793e949b5952f1 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 21 Jul 2010 17:34:32 +0200 Subject: fix compilation of quaternion demo --- demos/opengl/quaternion_demo.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'demos') diff --git a/demos/opengl/quaternion_demo.cpp b/demos/opengl/quaternion_demo.cpp index 1de645c05..c03a89cd5 100644 --- a/demos/opengl/quaternion_demo.cpp +++ b/demos/opengl/quaternion_demo.cpp @@ -25,10 +25,11 @@ #include "quaternion_demo.h" #include "icosphere.h" -#include +#include #include #include +#include #include #include #include @@ -187,8 +188,8 @@ public: Matrix3 toRotationMatrix(void) const { - Vector3 c = m_angles.cwise().cos(); - Vector3 s = m_angles.cwise().sin(); + Vector3 c = m_angles.array().cos(); + Vector3 s = m_angles.array().sin(); Matrix3 res; res << c.y()*c.z(), -c.y()*s.z(), s.y(), c.z()*s.x()*s.y()+c.x()*s.z(), c.x()*c.z()-s.x()*s.y()*s.z(), -c.y()*s.x(), -- cgit v1.2.3