From 42b9415a06df453487411ff5e8d76bce5e4a27bf Mon Sep 17 00:00:00 2001 From: leo Date: Sun, 5 Mar 2006 21:29:09 +0000 Subject: Removed redundant redraws when moving with the mouse, fixed the disc start in the rotation angle overlay. git-svn-id: http://svn.leocad.org/trunk@512 c7d43263-9d01-0410-8a33-9dba5d9f93d6 --- common/algebra.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'common/algebra.h') diff --git a/common/algebra.h b/common/algebra.h index 4a34b36..a91727d 100644 --- a/common/algebra.h +++ b/common/algebra.h @@ -386,6 +386,21 @@ public: m_Value = Vector4(AxisAngle[0] * s, AxisAngle[1] * s, AxisAngle[2] * s, cosf(AxisAngle[3] / 2.0f)); } + inline void CreateRotationX(float Radians) + { + m_Value = Vector4(sinf(Radians / 2.0f), 0, 0, cosf(Radians / 2.0f)); + } + + inline void CreateRotationY(float Radians) + { + m_Value = Vector4(0, sinf(Radians / 2.0f), 0, cosf(Radians / 2.0f)); + } + + inline void CreateRotationZ(float Radians) + { + m_Value = Vector4(0, 0, sinf(Radians / 2.0f), cosf(Radians / 2.0f)); + } + inline void ToAxisAngle(Vector4& AxisAngle) const { float Len = m_Value[0]*m_Value[0] + m_Value[1]*m_Value[1] + m_Value[2]*m_Value[2]; -- cgit v1.2.3