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 {
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[])
{
Tracer tr("diag");
......@@ -954,8 +935,6 @@ namespace MISCMATHS {
Matrix rotmat(3,3);
rotmat = aff3 * scales.i() * (skew.SubMatrix(1,3,1,3)).i();
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)
- centre;
for (int i=1; i<=3; i++) { params(i+3) = transl(i); }
......
......@@ -121,7 +121,6 @@ namespace MISCMATHS {
float norm2sq(float a, float b, float c);
int Identity(Matrix& m);
ReturnMatrix Identity(int num);
ColumnVector seq(const int num);
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