public override Base GetBase() { Base B = ModelMatrix.toBase(); B.BaseO = Point; return(B); }
public override Base GetBase() { Base B = ModelMatrix.toBase(); B.BaseO = Point; if (Lam >= 0) { xyz D = ModelMatrix * Poly.Direction(Lam) - ModelMatrix * new xyz(0, 0, 0); B = Base.DoComplete(Point, D, new xyz(0, 0, 1) & D); } return(B); }
public virtual Base GetBase() { Base B = ModelMatrix.toBase(); B.BaseO = Point; if ((TriangleInfo != null)) { Plane Triangle = new Plane(ModelMatrix * TriangleInfo.Points[TriangleInfo.Indices[PrimId * 3]], ModelMatrix * TriangleInfo.Points[TriangleInfo.Indices[PrimId * 3 + 1]], ModelMatrix * TriangleInfo.Points[TriangleInfo.Indices[PrimId * 3 + 2]]); return(Base.DoComplete(Point, Triangle.NormalUnit * (-1))); } return(B); }
public override Base GetBase() { xyzArray A = ModelMatrix * CurveArray.getxyArray().ToxyzArray(); Base B = ModelMatrix.toBase(); B.BaseO = Point; if (Lam >= 0) { xyz D = ModelMatrix * CurveArray.Direction(Lam).toXYZ() - ModelMatrix * new xyz(0, 0, 0); B = Base.DoComplete(Point, D, new xyz(0, 0, 1) & D); } return(B); }
public override Base GetBase() { Base B = ModelMatrix.toBase(); B.BaseO = Point; if (Lam >= 0) { xyz D = ModelMatrix * Curve.Derivation(Lam).toXYZ() - ModelMatrix * new xyz(0, 0, 0); B = Base.DoComplete(Point, D, new xyz(0, 0, 1) & D); } return(B); }
public override Base GetBase() { Base B = Base.UnitBase; B.BaseO = Point; int id = -1; xyArray A = null; LineType ViewLine = Device.FromScr(Device.MousePos); xyz P = ModelMatrix * ViewLine.P; xyz Q = ModelMatrix * ViewLine.Q; ViewLine = new LineType(P, Q); for (int i = 1; i < Loca.Count; i++) { A = Loca[i].getxyArray(); A = ModelMatrix * A; double Dummy = -1; double di = A.Distance(ViewLine, Snapdist * 8, out Lam, out Dummy); if (di <= Snapdist) { id = i; // break; } } if (id >= 0) { if (id == 1) { } if (Lam >= 0) { double L = Lam; Lam = Loca[id].xyArrayIndexToCurveArrayIndex(Lam); xyz D = Loca[id].Direction(Lam).toXYZ(); B = Base.DoComplete(A.Value(L).toXYZ(), D, new xyz(0, 0, 1) & D); } } else { B = ModelMatrix.toBase(); B.BaseO = Point; } return(B); }
public override Base GetBase() { Base B = ModelMatrix.toBase();; B.BaseO = Point; int id = -1; for (int i = 0; i < PolyPoly.Count; i++) { xyArray A = PolyPoly[i]; LineType ViewLine = Device.FromScr(Device.MousePos); double Dummy = -1; double di = A.Distance(ViewLine, 2 * Snapdist, out Lam, out Dummy); if (di <= 2 * Snapdist) { id = i; break; } } if (id >= 0) { xyzArray A = ModelMatrix * PolyPoly[id].ToxyzArray(); if (Lam >= 0) { xyz D = ModelMatrix * PolyPoly[id].Direction(Lam).toXYZ() - ModelMatrix * new xyz(0, 0, 0); B = Base.DoComplete(Point, D, new xyz(0, 0, 1) & D); } } else { xyzArray A = ModelMatrix * PolyPoly[0].ToxyzArray(); xyz D = A.cross(); B = Base.DoComplete(Point, D, new xyz(0, 0, 1) & D); } return(B); }