public bool IsPtOn(GPoint ptObj) { int count = this.m_vtPoints.Count; CLinesect cLinesect = new CLinesect(); bool result; if (count == 1) { result = (ptObj == this.Front()); } else { for (int i = 0; i < count - 1; i++) { cLinesect.SetPoints((GPoint)this.m_vtPoints[i], (GPoint)this.m_vtPoints[i + 1]); if (cLinesect.IsPtOnLine(ptObj)) { result = true; return(result); } } result = false; } return(result); }
public double GetAngleToLine(CLinesect tLine) { CVeObj vecOb = this.GetVecOb(); CVeObj vecOb2 = tLine.GetVecOb(); return(vecOb.GetAngleToVe(vecOb2)); }
public double GetMinDistanceToPt(GPoint ptDst) { int count = this.m_vtPoints.Count; double num = 1.7976931348623157E+308; for (int i = 1; i < count; i++) { CLinesect cLinesect = new CLinesect((GPoint)this.m_vtPoints[i - 1], (GPoint)this.m_vtPoints[i]); double lenToPt = cLinesect.GetLenToPt(ptDst); num = Math.Min(num, lenToPt); } return(num); }
public long GetInterSectPointofTwoLinesectWithHeightForTranSect(CLinesect lnObj, ref GPoint ptInsect) { long interSectPointofTwoLinesect = ApplyMath.GetInterSectPointofTwoLinesect(this.gpoint_0, this.gpoint_1, lnObj.GetFirstPt(), lnObj.GetSecondPt(), ref ptInsect); long result; if (interSectPointofTwoLinesect == 0L) { result = interSectPointofTwoLinesect; } else { double num; ApplyMath.GetPointOnLineZ(lnObj.gpoint_0.X, lnObj.gpoint_0.Y, lnObj.gpoint_0.Z, lnObj.gpoint_1.X, lnObj.gpoint_1.Y, lnObj.gpoint_1.Z, ptInsect.X, ptInsect.Y, out num); ptInsect.Z = num; ApplyMath.GetPointOnLineZ(lnObj.gpoint_0.X, lnObj.gpoint_0.Y, lnObj.gpoint_0.M, lnObj.gpoint_1.X, lnObj.gpoint_1.Y, lnObj.gpoint_1.M, ptInsect.X, ptInsect.Y, out num); ptInsect.M = num; result = 1L; } return(result); }
public long GetInterSectPointofTwoLinesect(CLinesect lnObj, ref GPoint ptInsect) { return(ApplyMath.GetInterSectPointofTwoLinesect(this.gpoint_0, this.gpoint_1, lnObj.GetFirstPt(), lnObj.GetSecondPt(), ref ptInsect)); }