C# 클래스 MapAround.Geometry.MonotoneChain

Represents a monotone chain of segments. All segments in chain are placed in single quadrant Monotone chain segments are used to avoid a large number of segments intersection checks.
상속: IIndexable
파일 보기 프로젝트 열기: gkrsu/maparound.core 1 사용 예제들

공개 메소드들

메소드 설명
BoundsContainPoint ( ICoordinate point ) : bool

Determines whether the bounding rectangle of this monotone chain contains point.

BoundsIntersect ( MonotoneChain chain ) : bool

Determines whether the bounding rectangle of this chain intersects the bounding rectangle of specified chain.

Clone ( ) : object

Creates a new object that is a copy of the current instance.

CrossesWith ( MonotoneChain chain ) : bool

Determines whether this chain crosses with other.

GetCrossPoints ( MonotoneChain chain ) : List

Calculates the intersection points of two chains.

GetCrossSegments ( MonotoneChain chain ) : List

Computes the 2D intersections of two chains.

GetSegmentOrientation ( Segment segment ) : Orientation

Computes an orientation of specified segment.

InsertSegment ( Segment segment ) : bool

Adds a segment to the chain.

InsertSegment ( Segment segment, SegmentLabel label ) : bool

Adds a segment to the chain.

IsPointInSegmentsBounds ( ICoordinate point ) : bool

Defines if a specified point lies into the bounding rectangle of any segment of chain.

MonotoneChain ( Orientation orientation ) : System

Initializes a new instance of MonotoneChain.

MonotoneChain ( Segment segment ) : System

Initializes a new instance of MonotoneChain.

MonotoneChain ( Segment segment, SegmentLabel tag ) : System

Initializes a new instance of MonotoneChain.

ReduceSegments ( double minLength ) : void

Removes all segments from chain which length is less than specified. The remaining segments are connected.

ReplaceLabel ( int index, SegmentLabel newValue ) : void

Replaces the label associated with segment having specified index in the chain.

Split ( List list ) : bool

Splits the segments of the chain at the specified points.

비공개 메소드들

메소드 설명
boundsChanged ( ) : void
checkSegment ( Segment segment ) : bool
getSubChainBounds ( int index1, int index2 ) : BoundingRectangle
internalInsertSegment ( Segment segment, SegmentLabel tag ) : void
isPointInSegmentsBounds ( ICoordinate point, int minIndex, int maxIndex ) : bool

메소드 상세

BoundsContainPoint() 공개 메소드

Determines whether the bounding rectangle of this monotone chain contains point.
public BoundsContainPoint ( ICoordinate point ) : bool
point ICoordinate Point coordinate
리턴 bool

BoundsIntersect() 공개 메소드

Determines whether the bounding rectangle of this chain intersects the bounding rectangle of specified chain.
public BoundsIntersect ( MonotoneChain chain ) : bool
chain MonotoneChain Monotone chain
리턴 bool

Clone() 공개 메소드

Creates a new object that is a copy of the current instance.
public Clone ( ) : object
리턴 object

CrossesWith() 공개 메소드

Determines whether this chain crosses with other.
public CrossesWith ( MonotoneChain chain ) : bool
chain MonotoneChain Chain
리턴 bool

GetCrossPoints() 공개 메소드

Calculates the intersection points of two chains.
public GetCrossPoints ( MonotoneChain chain ) : List
chain MonotoneChain Monotone chain
리턴 List

GetCrossSegments() 공개 메소드

Computes the 2D intersections of two chains.
public GetCrossSegments ( MonotoneChain chain ) : List
chain MonotoneChain Monotone chain
리턴 List

GetSegmentOrientation() 공개 정적인 메소드

Computes an orientation of specified segment.
public static GetSegmentOrientation ( Segment segment ) : Orientation
segment Segment Segment to compute orientation
리턴 Orientation

InsertSegment() 공개 메소드

Adds a segment to the chain.
public InsertSegment ( Segment segment ) : bool
segment Segment The segment to add
리턴 bool

InsertSegment() 공개 메소드

Adds a segment to the chain.
public InsertSegment ( Segment segment, SegmentLabel label ) : bool
segment Segment The segment to add
label SegmentLabel The label of the segment
리턴 bool

IsPointInSegmentsBounds() 공개 메소드

Defines if a specified point lies into the bounding rectangle of any segment of chain.
public IsPointInSegmentsBounds ( ICoordinate point ) : bool
point ICoordinate Coordinate of point
리턴 bool

MonotoneChain() 공개 메소드

Initializes a new instance of MonotoneChain.
public MonotoneChain ( Orientation orientation ) : System
orientation Orientation Orientation of segments
리턴 System

MonotoneChain() 공개 메소드

Initializes a new instance of MonotoneChain.
public MonotoneChain ( Segment segment ) : System
segment Segment An initial segment
리턴 System

MonotoneChain() 공개 메소드

Initializes a new instance of MonotoneChain.
public MonotoneChain ( Segment segment, SegmentLabel tag ) : System
segment Segment An initial segment
tag SegmentLabel A label of initial segment
리턴 System

ReduceSegments() 공개 메소드

Removes all segments from chain which length is less than specified. The remaining segments are connected.
public ReduceSegments ( double minLength ) : void
minLength double The minimum length of segment
리턴 void

ReplaceLabel() 공개 메소드

Replaces the label associated with segment having specified index in the chain.
public ReplaceLabel ( int index, SegmentLabel newValue ) : void
index int The index of segment in the chain
newValue SegmentLabel Instance of label
리턴 void

Split() 공개 메소드

Splits the segments of the chain at the specified points.
public Split ( List list ) : bool
list List A list contatinig points where you need to split the chain
리턴 bool