예제 #1
0
        /// <summary>
        /// Transforms points from plane space to world space.
        /// </summary>
        public static V3d[] Unproject(this Plane3d plane, IReadOnlyList <V2d> points)
        {
            var local2global = plane.GetPlaneToWorld();
            var xs           = new V3d[points.Count];

            for (var i = 0; i < points.Count; i++)
            {
                xs[i] = local2global.TransformPos(points[i].XYO);
            }
            return(xs);
        }
예제 #2
0
        /// <summary>
        /// Transforms points from plane space to world space.
        /// </summary>
        public static V3d[] Unproject(this Plane3d plane, V2d[] points)
        {
            var local2global = plane.GetPlaneToWorld();

            return(points.Map(p => local2global.TransformPos(p.XYO)));
        }
예제 #3
0
        /// <summary>
        /// Transforms point from plane space to world space.
        /// </summary>
        public static V3d Unproject(this Plane3d plane, V2d point)
        {
            var local2global = plane.GetPlaneToWorld();

            return(local2global.TransformPos(point.XYO));
        }