|
From: <axl...@us...> - 2009-05-31 04:18:09
|
Revision: 287
http://hgengine.svn.sourceforge.net/hgengine/?rev=287&view=rev
Author: axlecrusher
Date: 2009-05-31 04:18:08 +0000 (Sun, 31 May 2009)
Log Message:
-----------
rotate by quaternion
Modified Paths:
--------------
Mercury2/src/MercuryMatrix.cpp
Modified: Mercury2/src/MercuryMatrix.cpp
===================================================================
--- Mercury2/src/MercuryMatrix.cpp 2009-05-31 04:13:24 UTC (rev 286)
+++ Mercury2/src/MercuryMatrix.cpp 2009-05-31 04:18:08 UTC (rev 287)
@@ -120,6 +120,13 @@
(*this)[3][3] = 1;
}
+void MercuryMatrix::Rotate(const MQuaternion& q)
+{
+ MercuryMatrix m;
+ q.normalize().toMatrix4( m );
+ *this *= m;
+}
+
void MercuryMatrix::Transotale( float tX, float tY, float tZ, float rX, float rY, float rZ, float sX, float sY, float sZ )
{
//x,y,z must be negated for some reason
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|