public Matrix4d CalculateRegistrationMatrix(PointCloud pcOriginal) { Vector3d v = new Vector3d(); Matrix4d myMatrix = Matrix4d.Identity; if (this.GLrender.RenderableObjects.Count > 1) { RenderableObject o = this.GLrender.RenderableObjects[0]; PointCloud pc1 = o.PointCloud; myMatrix = SVD.FindTransformationMatrix(v.ArrayVector3ToList(pcOriginal.Vectors), v.ArrayVector3ToList(pc1.Vectors), ICP_VersionUsed.Scaling_Umeyama); //myMatrix = SVD.FindTransformationMatrix_WithoutCentroids(v.ArrayVector3ToList(pc1.Vectors), v.ArrayVector3ToList(pc2.Vectors), ICP_VersionUsed.Scaling_Umeyama); } else { System.Windows.Forms.MessageBox.Show("Please load two Point Clouds first"); } return(myMatrix); }