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))); }
Hisui.Geom.CodSys3d[] GetQuadPlanes() { var points = this.GetQuadPoints(); var planes = new Hisui.Geom.CodSys3d[4]; for (int i = 0; i < 4; ++i) { var u = (points[(i + 1) % 4] - points[i]).Normalize(); var v = _clip.CodSys.n; planes[i] = new Hisui.Geom.CodSys3d(u, v, points[i]); } return(planes); }
Hisui.Geom.CodSys3d[] GetQuadPlanes() { var points = this.GetQuadPoints(); var planes = new Hisui.Geom.CodSys3d[4]; for ( int i = 0 ; i < 4 ; ++i ) { var u = (points[(i + 1) % 4] - points[i]).Normalize(); var v = _clip.CodSys.n; planes[i] = new Hisui.Geom.CodSys3d( u, v, points[i] ); } return planes; }