Skip to content
Snippets Groups Projects
Commit 4dd955aa authored by Matthew Webster's avatar Matthew Webster
Browse files

Identity to IdentityMatrix

parent e14b7820
No related branches found
No related tags found
No related merge requests found
...@@ -446,25 +446,6 @@ namespace MISCMATHS { ...@@ -446,25 +446,6 @@ namespace MISCMATHS {
return a*a + b*b + c*c; return a*a + b*b + c*c;
} }
int Identity(Matrix& m)
{
Tracer tr("Identity");
m=0.0;
for (int j=1; j<=m.Nrows(); j++)
m(j,j)=1.0;
return 0;
}
ReturnMatrix Identity(int num)
{
Tracer tr("Identity");
Matrix eye(num,num);
Identity(eye);
eye.Release();
return eye;
}
int diag(Matrix& m, const float diagvals[]) int diag(Matrix& m, const float diagvals[])
{ {
Tracer tr("diag"); Tracer tr("diag");
...@@ -954,8 +935,6 @@ namespace MISCMATHS { ...@@ -954,8 +935,6 @@ namespace MISCMATHS {
Matrix rotmat(3,3); Matrix rotmat(3,3);
rotmat = aff3 * scales.i() * (skew.SubMatrix(1,3,1,3)).i(); rotmat = aff3 * scales.i() * (skew.SubMatrix(1,3,1,3)).i();
ColumnVector transl(3); ColumnVector transl(3);
//transl = affmat.SubMatrix(1,3,4,4);
//transl = transl - (Identity(3) - rotmat)*centre;
transl = affmat.SubMatrix(1,3,1,3)*centre + affmat.SubMatrix(1,3,4,4) transl = affmat.SubMatrix(1,3,1,3)*centre + affmat.SubMatrix(1,3,4,4)
- centre; - centre;
for (int i=1; i<=3; i++) { params(i+3) = transl(i); } for (int i=1; i<=3; i++) { params(i+3) = transl(i); }
......
...@@ -121,7 +121,6 @@ namespace MISCMATHS { ...@@ -121,7 +121,6 @@ namespace MISCMATHS {
float norm2sq(float a, float b, float c); float norm2sq(float a, float b, float c);
int Identity(Matrix& m); int Identity(Matrix& m);
ReturnMatrix Identity(int num);
ColumnVector seq(const int num); ColumnVector seq(const int num);
int diag(Matrix& m, const float diagvals[]); int diag(Matrix& m, const float diagvals[]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment