Example #1
0
        public static double Test8_CubeOutliers_Translate(ref List <Vertex> myVerticesTarget, ref List <Vertex> myVerticesSource, ref List <Vertex> myVerticesResult)
        {
            myVerticesTarget = Vertices.CreateCube_Corners(20);
            myVerticesSource = VertexUtils.CloneListVertex(myVerticesTarget);
            VertexUtils.TranslateVertices(myVerticesSource, 0, -300, 0);
            VertexUtils.CreateOutliers(myVerticesSource, 5);


            myVerticesResult = IterativeClosestPointTransform.Instance.PerformICP(myVerticesTarget, myVerticesSource);
            return(IterativeClosestPointTransform.Instance.MeanDistance);
        }
Example #2
0
        public static double Test8_CubeOutliers_Rotate(ref List <Vertex> myVerticesTarget, ref List <Vertex> myVerticesSource, ref List <Vertex> myVerticesResult)
        {
            //myVerticesTarget = Vertices.CreateCube_Corners(50);
            Model3D myModel = Example3DModels.Cuboid("Cuboid", 20f, 40f, 100, new Vector3d(1, 1, 1), null);

            myVerticesTarget = myModel.VertexList;

            myVerticesSource = VertexUtils.CloneListVertex(myVerticesTarget);
            Matrix3d R = new Matrix3d();

            R = R.Rotation30Degrees();
            VertexUtils.RotateVertices(myVerticesSource, R);

            VertexUtils.CreateOutliers(myVerticesSource, 5);


            myVerticesResult = IterativeClosestPointTransform.Instance.PerformICP(myVerticesTarget, myVerticesSource);
            return(IterativeClosestPointTransform.Instance.MeanDistance);
        }