public static double Test5_CubeScale_Inhomogenous(ref List <Vertex> myVerticesTarget, ref List <Vertex> myVerticesSource, ref List <Vertex> myVerticesResult) { myVerticesTarget = Vertices.CreateCube_Corners(50); myVerticesSource = VertexUtils.CloneListVertex(myVerticesTarget); VertexUtils.ScaleByVector(myVerticesSource, new Vertex(1, 2, 3)); myVerticesResult = IterativeClosestPointTransform.Instance.PerformICP(myVerticesTarget, myVerticesSource); return(IterativeClosestPointTransform.Instance.MeanDistance); }
public static double Test5_CubeRotateTranslate_ScaleInhomogenous(ref List <Vertex> myVerticesTarget, ref List <Vertex> myVerticesSource, ref List <Vertex> myVerticesResult) { myVerticesTarget = Vertices.CreateCube_Corners(50); myVerticesSource = VertexUtils.CloneListVertex(myVerticesTarget); VertexUtils.TranslateVertices(myVerticesSource, 0, 0, 149); VertexUtils.ScaleByVector(myVerticesSource, new Vertex(1, 2, 3)); Matrix3d R = new Matrix3d(); R = R.RotateSome(); VertexUtils.RotateVertices(myVerticesSource, R); myVerticesResult = IterativeClosestPointTransform.Instance.PerformICP(myVerticesTarget, myVerticesSource); return(IterativeClosestPointTransform.Instance.MeanDistance); }