diff --git a/vcg/math/quaternion.h b/vcg/math/quaternion.h index b85f2697..678ab6e2 100644 --- a/vcg/math/quaternion.h +++ b/vcg/math/quaternion.h @@ -24,8 +24,14 @@ History $Log: not supported by cvs2svn $ +Revision 1.7 2004/04/07 10:48:37 cignoni +updated access to matrix44 elements through V() instead simple [] + Revision 1.6 2004/03/25 14:57:49 ponchio Microerror. ($LOG$ -> $Log: not supported by cvs2svn $ +Microerror. ($LOG$ -> Revision 1.7 2004/04/07 10:48:37 cignoni +Microerror. ($LOG$ -> updated access to matrix44 elements through V() instead simple [] +Microerror. ($LOG$ -> ****************************************************************************/ @@ -59,6 +65,10 @@ public: Quaternion &operator*=(const Quaternion &q); void Invert(); + + void SetIdentity(); + + void FromAxis(const S phi, const Point3 &a); void ToAxis(S &phi, Point3 &a ) const; @@ -74,7 +84,12 @@ template Quaternion Inverse(const Quaternion &q); //Implementation +template +void Quaternion::SetIdentity(){ + FromAxis(0, Point3(1, 0, 0)); +} + template Quaternion::Quaternion(const S phi, const Point3 &a) { FromAxis(phi, a); }