Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SegmentNode"/> class.
 /// </summary>
 /// <param name="segString"></param>
 /// <param name="coord"></param>
 /// <param name="segmentIndex"></param>
 /// <param name="segmentOctant"></param>
 public SegmentNode(SegmentString segString, Coordinate coord, int segmentIndex, OctantDirection segmentOctant)
 {
     Coordinate     = new Coordinate(coord);
     SegmentIndex   = segmentIndex;
     _segmentOctant = segmentOctant;
     _isInterior    = !coord.Equals2D(segString.GetCoordinate(segmentIndex));
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SegmentNode"/> class.
 /// </summary>
 /// <param name="segString"></param>
 /// <param name="coord"></param>
 /// <param name="segmentIndex"></param>
 /// <param name="segmentOctant"></param>
 public SegmentNode(SegmentString segString, Coordinate coord, int segmentIndex, OctantDirection segmentOctant)
 {
     Coordinate = new Coordinate(coord);
     SegmentIndex = segmentIndex;
     _segmentOctant = segmentOctant;
     _isInterior = !coord.Equals2D(segString.GetCoordinate(segmentIndex));
 }
Beispiel #3
0
        /// <summary>
        /// Adds nodes for the first and last points of the edge.
        /// </summary>
        private void AddEndPoints()
        {
            int maxSegIndex = _edge.Count - 1;

            Add(_edge.GetCoordinate(0), 0);
            Add(_edge.GetCoordinate(maxSegIndex), maxSegIndex);
        }