本文整理汇总了C#中Line.TurnDirectionToPoint方法的典型用法代码示例。如果您正苦于以下问题:C# Line.TurnDirectionToPoint方法的具体用法?C# Line.TurnDirectionToPoint怎么用?C# Line.TurnDirectionToPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Line
的用法示例。
在下文中一共展示了Line.TurnDirectionToPoint方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CalculateIsLargeArc
internal bool CalculateIsLargeArc(ITurnCircleArcSegment segment)
{
Geometry.Shapes.Point startPoint = segment.CentrePoint;
Geometry.Shapes.Point endPoint = segment.CircleOrigin == Constants.CircleOrigin.Start
? segment.EndPoint
: segment.StartPoint;
Geometry.Shapes.Point checkPoint = segment.CircleOrigin == Constants.CircleOrigin.Start
? segment.StartPoint
: segment.EndPoint;
var line = new Line(-1,
startPoint,
endPoint);
Constants.TurnDirection turnDirection = line.TurnDirectionToPoint(checkPoint);
bool isLargeArc;
if ( segment.CircleOrigin == Constants.CircleOrigin.Start )
{
isLargeArc = turnDirection == segment.TurnDirection;
}
else
{
isLargeArc = turnDirection != segment.TurnDirection;
}
return isLargeArc;
}