|
From: <axl...@us...> - 2010-05-03 02:12:00
|
Revision: 718
http://hgengine.svn.sourceforge.net/hgengine/?rev=718&view=rev
Author: axlecrusher
Date: 2010-05-03 02:11:54 +0000 (Mon, 03 May 2010)
Log Message:
-----------
Take advantage of the source and destination matrices being able to be the same address.
Modified Paths:
--------------
Mercury2/src/MercuryMatrix.cpp
Modified: Mercury2/src/MercuryMatrix.cpp
===================================================================
--- Mercury2/src/MercuryMatrix.cpp 2010-05-03 02:07:24 UTC (rev 717)
+++ Mercury2/src/MercuryMatrix.cpp 2010-05-03 02:11:54 UTC (rev 718)
@@ -209,7 +209,7 @@
{
MercuryMatrix m;
q.toMatrix4( m );
- *this *= m;
+ MatrixMultiply4f( m_matrix, m.m_matrix, m_matrix );
}
void MercuryMatrix::Transotale( float tX, float tY, float tZ, float rX, float rY, float rZ, float sX, float sY, float sZ )
@@ -261,20 +261,19 @@
m[1][1] = y;
m[2][2] = z;
- *this *= m;
+ MatrixMultiply4f ( m_matrix, m.m_matrix, m_matrix);
}
MercuryMatrix MercuryMatrix::operator*(const MercuryMatrix& m) const
{
- MercuryMatrix r(*this);
+ MercuryMatrix r;
MatrixMultiply4f ( m_matrix, m.m_matrix, r.m_matrix);
return r;
}
MercuryMatrix& MercuryMatrix::operator*=(const MercuryMatrix& m)
{
- MercuryMatrix r(*this);
- MatrixMultiply4f ( r.m_matrix, m.m_matrix, m_matrix);
+ MatrixMultiply4f ( m_matrix, m.m_matrix, m_matrix);
return *this;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|