本文整理匯總了C#中System.Edge.SetIsIsolated方法的典型用法代碼示例。如果您正苦於以下問題:C# Edge.SetIsIsolated方法的具體用法?C# Edge.SetIsIsolated怎麽用?C# Edge.SetIsIsolated使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Edge
的用法示例。
在下文中一共展示了Edge.SetIsIsolated方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: AddIntersections
/// <summary>
/// This method is called by clients of the EdgeIntersector class to test for and add
/// intersections for two segments of the edges being intersected.
/// Note that clients (such as MonotoneChainEdges) may choose not to intersect
/// certain pairs of segments for efficiency reasons.
/// </summary>
/// <param name="e0"></param>
/// <param name="segIndex0"></param>
/// <param name="e1"></param>
/// <param name="segIndex1"></param>
public void AddIntersections(Edge e0, int segIndex0, Edge e1, int segIndex1)
{
if ( e0 == e1 && segIndex0 == segIndex1) return;
_numTests++;
Coordinate p00 = e0.Coordinates[segIndex0];
Coordinate p01 = e0.Coordinates[segIndex0 + 1];
Coordinate p10 = e1.Coordinates[segIndex1];
Coordinate p11 = e1.Coordinates[segIndex1 + 1];
_lineIntersector.ComputeIntersection( p00, p01, p10, p11);
if ( _lineIntersector.HasIntersection() )
{
if ( _recordIsolated )
{
e0.SetIsIsolated( false );
e1.SetIsIsolated( false );
}
//intersectionFound = true;
_numIntersections++;
// if the segments are adjacent they have at least one trivial intersection,
// the shared endpoint. Don't bother adding it if it is the
// only intersection.
if ( !IsTrivialIntersection( e0, segIndex0, e1, segIndex1) )
{
_hasIntersection = true;
if ( _includeProper || ! _lineIntersector.IsProper() )
{
//Debug.println(_lineIntersector);
e0.AddIntersections( _lineIntersector, segIndex0, 0 );
e1.AddIntersections( _lineIntersector, segIndex1, 1 );
}
if ( _lineIntersector.IsProper() )
{
_properIntersectionPoint = (Coordinate) _lineIntersector.GetIntersection(0).Clone();
_hasProper = true;
if ( !IsBoundaryPoint( _lineIntersector, _bdyNodes) )
{
_hasProperInterior = true;
}
}
} // if ( !IsTrivialIntersection( e0, segIndex0, e1, segIndex1) )
} // if ( _lineIntersector.HasIntersection() )
}