예제 #1
0
        /// <summary>
        /// Projects points from world space to plane space (shortest distance).
        /// </summary>
        public static V2d[] ProjectToPlaneSpace(this Plane3d plane, V3d[] points)
        {
            var global2local = plane.GetWorldToPlane();

            return(points.Map(p => global2local.TransformPos(p).XY));
        }
예제 #2
0
 /// <summary>
 /// Projects a point from world space to plane space (shortest distance).
 /// </summary>
 public static V2d ProjectToPlaneSpace(this Plane3d plane, V3d p)
 => plane.GetWorldToPlane().TransformPos(p).XY;