Example #1
0
        static Hisui.Geom.Point2d GetIntersection(Hisui.Geom.CodSys3d plane, Hisui.Geom.Line3d line)
        {
            var t = GeomUT.Dot(plane.o - line.Origin, plane.n) / GeomUT.Dot(line.Direction, plane.n);
            var r = line.Position(t) - plane.o;

            return(GeomUT.P(GeomUT.Dot(plane.u, r), GeomUT.Dot(plane.v, r)));
        }
Example #2
0
        Hisui.Geom.Point3d[] GetQuadPoints()
        {
            var radius = _docviews.WorldDocumentScene.BoundingSphere.Radius;
            var points = CoreUT.MakeArray(
                GeomUT.P(radius, radius),
                GeomUT.P(-radius, radius),
                GeomUT.P(-radius, -radius),
                GeomUT.P(radius, -radius));

            return(CoreUT.MakeArray(4, i => _clip.CodSys.Globalize(points[i])));
        }