コード例 #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 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));
        }
コード例 #3
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)));
        }
コード例 #4
0
ファイル: Plane3d.cs プロジェクト: forki/aardvark.base
        /// <summary>
        /// Transforms points from plane space to world space.
        /// </summary>
        public static V3d[] Unproject(this Plane3d plane, IEnumerable <V2d> points)
        {
            var local2global = plane.GetPlaneToWorld();

            return(points.Select(x => local2global.TransformPos(x.XYO)).ToArray());
        }