public static ILength GetDistance(ILineSegmentGeometry g, IPosition point) { double xp, yp; BasicGeom.GetPerpendicular(point.X, point.Y, g.Start.X, g.Start.Y, g.End.X, g.End.Y, out xp, out yp); double d = BasicGeom.Distance(new Position(xp, yp), point); return(new Length(d)); }
internal override uint IntersectSegment(IntersectionResult results, ILineSegmentGeometry that) { return IntersectionHelper.Intersect(results, (ILineSegmentGeometry)this, that); }
abstract internal uint IntersectSegment(IntersectionResult results, ILineSegmentGeometry seg);
internal override uint IntersectSegment(IntersectionResult results, ILineSegmentGeometry seg) { return(Make().IntersectSegment(results, seg)); }
public static ILength GetDistance(ILineSegmentGeometry g, IPosition point) { double xp, yp; BasicGeom.GetPerpendicular(point.X, point.Y, g.Start.X, g.Start.Y, g.End.X, g.End.Y, out xp, out yp); double d = BasicGeom.Distance(new Position(xp, yp), point); return new Length(d); }
internal static uint Intersect(IntersectionResult result, ILineSegmentGeometry seg, ICircleGeometry circle) { return Intersect(result, seg.Start, seg.End, circle.Center, circle.Radius); }
internal static uint Intersect(IntersectionResult result, ILineSegmentGeometry seg, IMultiSegmentGeometry line) { uint nx=0; IPointGeometry a = seg.Start; IPointGeometry b = seg.End; IPointGeometry[] data = line.Data; for (int i=1; i<data.Length; i++) nx += Intersect(result, a, b, data[i-1], data[i]); return nx; }
internal override uint IntersectSegment(IntersectionResult results, ILineSegmentGeometry that) { return(IntersectionHelper.Intersect(results, that, (ICircularArcGeometry)this)); }
public static IWindow GetExtent(ILineSegmentGeometry g) { return(new Window(g.Start, g.End)); }
public static void Render(ILineSegmentGeometry g, ISpatialDisplay display, IDrawStyle style) { style.Render(display, new IPosition[] { g.Start, g.End }); }
/// <summary> /// Copy constructor. /// </summary> /// <param name="g">The geometry to copy</param> public LineSegmentGeometry(ILineSegmentGeometry g) { m_Start = g.Start; m_End = g.End; }
/// <summary> /// Gets the position that is a specific distance from the start of a line segment. /// </summary> /// <param name="g">The line segment</param> /// <param name="dist">The distance from the start of the segment.</param> /// <param name="result">The position found</param> /// <returns>True if the distance is somewhere ON the line. False if the distance /// was less than zero, or more than the line length (in that case, the position /// found corresponds to the corresponding terminal point).</returns> public static bool GetPosition(ILineSegmentGeometry g, double d, out IPosition result) { return GetPosition(g.Start, g.End, d, out result); }
public static ILength GetLength(ILineSegmentGeometry g) { double d = BasicGeom.Distance(g.Start, g.End); return new Length(d); }
public static IWindow GetExtent(ILineSegmentGeometry g) { return new Window(g.Start, g.End); }
internal uint IntersectSegment(ILineSegmentGeometry seg) { return m_IntersectedObject.LineGeometry.IntersectSegment(this, seg); }
public static ILength GetLength(ILineSegmentGeometry g) { double d = BasicGeom.Distance(g.Start, g.End); return(new Length(d)); }
internal uint IntersectSegment(ILineSegmentGeometry seg) { return(m_IntersectedObject.LineGeometry.IntersectSegment(this, seg)); }
/// <summary> /// Gets the position that is a specific distance from the start of a line segment. /// </summary> /// <param name="g">The line segment</param> /// <param name="dist">The distance from the start of the segment.</param> /// <param name="result">The position found</param> /// <returns>True if the distance is somewhere ON the line. False if the distance /// was less than zero, or more than the line length (in that case, the position /// found corresponds to the corresponding terminal point).</returns> public static bool GetPosition(ILineSegmentGeometry g, double d, out IPosition result) { return(GetPosition(g.Start, g.End, d, out result)); }
internal override uint IntersectSegment(IntersectionResult results, ILineSegmentGeometry seg) { return Make().IntersectSegment(results, seg); }
internal static uint Intersect(IntersectionResult result, ILineSegmentGeometry seg, ICircularArcGeometry arc) { if (CircularArcGeometry.IsCircle(arc)) return Intersect(result, seg, arc.Circle); else return Intersect(result, seg.Start, seg.End, arc.First, arc.Second, arc.Circle); }
internal static uint Intersect(IntersectionResult results, ILineSegmentGeometry ab, ILineSegmentGeometry pq) { return Intersect(results, ab.Start, ab.End, pq.Start, pq.End); }
internal abstract uint IntersectSegment(IntersectionResult results, ILineSegmentGeometry seg);