/// <summary> /// Snaps (nodes) all interacting segments to this hot pixel. /// The hot pixel may represent a vertex of an edge, /// in which case this routine uses the optimization /// of not noding the vertex itself /// </summary> /// <param name="hotPixel">The hot pixel to snap to.</param> /// <param name="parentEdge">The edge containing the vertex, if applicable, or <c>null</c>.</param> /// <param name="vertexIndex"></param> /// <returns><c>true</c> if a node was added for this pixel.</returns> public bool Snap(HotPixel hotPixel, SegmentString parentEdge, int vertexIndex) { Envelope pixelEnv = hotPixel.GetSafeEnvelope(); HotPixelSnapAction hotPixelSnapAction = new HotPixelSnapAction(hotPixel, parentEdge, vertexIndex); _index.Query(pixelEnv, new QueryVisitor(pixelEnv, hotPixelSnapAction)); return hotPixelSnapAction.IsNodeAdded; }
/// <summary> /// Snaps (nodes) all interacting segments to this hot pixel. /// The hot pixel may represent a vertex of an edge, /// in which case this routine uses the optimization /// of not noding the vertex itself /// </summary> /// <param name="hotPixel">The hot pixel to snap to.</param> /// <param name="parentEdge">The edge containing the vertex, if applicable, or <c>null</c>.</param> /// <param name="vertexIndex"></param> /// <returns><c>true</c> if a node was added for this pixel.</returns> public bool Snap(HotPixel hotPixel, SegmentString parentEdge, int vertexIndex) { IEnvelope pixelEnv = hotPixel.GetSafeEnvelope(); HotPixelSnapAction hotPixelSnapAction = new HotPixelSnapAction(hotPixel, parentEdge, vertexIndex); index.Query(pixelEnv, new QueryVisitor(pixelEnv, hotPixelSnapAction)); return(hotPixelSnapAction.IsNodeAdded); }
/// <summary> /// Snaps (nodes) all interacting segments to this hot pixel. /// The hot pixel may represent a vertex of an edge, /// in which case this routine uses the optimization /// of not noding the vertex itself /// </summary> /// <param name="hotPixel">The hot pixel to snap to.</param> /// <param name="parentEdge">The edge containing the vertex, if applicable, or <c>null</c>.</param> /// <param name="hotPixelVertexIndex"></param> /// <returns><c>true</c> if a node was added for this pixel.</returns> public bool Snap(HotPixel hotPixel, ISegmentString parentEdge, int hotPixelVertexIndex) { var pixelEnv = hotPixel.GetSafeEnvelope(); var hotPixelSnapAction = new HotPixelSnapAction(hotPixel, parentEdge, hotPixelVertexIndex); _index.Query(pixelEnv, new QueryVisitor(pixelEnv, hotPixelSnapAction)); return(hotPixelSnapAction.IsNodeAdded); }
public PointSnapperItemVisitor(Envelope pixelEnv, HotPixelSnapAction hotPixelSnapAction, MCIndexPointSnapper pointSnapper) { this.pixelEnv = pixelEnv; this.hotPixelSnapAction = hotPixelSnapAction; this.enclosingInstance = pointSnapper; }
/// <summary> /// Snaps (nodes) all interacting segments to this hot pixel. /// The hot pixel may represent a vertex of an edge, /// in which case this routine uses the optimization /// of not noding the vertex itself /// /// </summary> /// <param name="hotPixel">the hot pixel to snap to /// </param> /// <param name="parentEdge">the edge containing the vertex, if applicable, or <code>null</code> /// </param> /// <param name="vertexIndex">the index of the vertex, if applicable, or -1 /// </param> /// <returns> <see langword="true"/> if a node was added for this pixel /// </returns> public bool Snap(HotPixel hotPixel, SegmentString parentEdge, int vertexIndex) { Envelope pixelEnv = hotPixel.SafeEnvelope; HotPixelSnapAction hotPixelSnapAction = new HotPixelSnapAction( this, hotPixel, parentEdge, vertexIndex); index.Query(pixelEnv, new PointSnapperItemVisitor(pixelEnv, hotPixelSnapAction, this)); return(hotPixelSnapAction.NodeAdded); }
/// <summary> /// /// </summary> /// <param name="env"></param> /// <param name="action"></param> public QueryVisitor(IEnvelope env, HotPixelSnapAction action) { this.env = env; this.action = action; }
/// <summary> /// /// </summary> /// <param name="env"></param> /// <param name="action"></param> public QueryVisitor(Envelope env, HotPixelSnapAction action) { _env = env; _action = action; }
/// <summary> /// /// </summary> /// <param name="env"></param> /// <param name="action"></param> public QueryVisitor(Envelope env, HotPixelSnapAction action) { this.env = env; this.action = action; }