本文整理汇总了C#中ICurve.RightDerivative方法的典型用法代码示例。如果您正苦于以下问题:C# ICurve.RightDerivative方法的具体用法?C# ICurve.RightDerivative怎么用?C# ICurve.RightDerivative使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICurve
的用法示例。
在下文中一共展示了ICurve.RightDerivative方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetPointOnTheLeftBoundaryPortConeSide
Point GetPointOnTheLeftBoundaryPortConeSide(Point portLocation, ICurve boundaryCurve, bool curveIsClockwise,
double portParam) {
Point tan = curveIsClockwise
? -boundaryCurve.LeftDerivative(portParam)
: boundaryCurve.RightDerivative(portParam);
return portLocation + tan.Rotate(-EnteringAngleBound);
}
示例2: TakeBoundaryPortOutsideOfItsLoosePolyline
Point TakeBoundaryPortOutsideOfItsLoosePolyline(ICurve nodeBoundary, double parameter, Polyline loosePolyline) {
Point location = nodeBoundary[parameter];
Point tangent =
(nodeBoundary.LeftDerivative(parameter).Normalize() +
nodeBoundary.RightDerivative(parameter).Normalize()).Normalize();
if (Point.GetTriangleOrientation(PointInsideOfConvexCurve(nodeBoundary), location, location + tangent) ==
TriangleOrientation.Counterclockwise)
tangent = -tangent;
tangent = tangent.Rotate(Math.PI/2);
double len = loosePolyline.BoundingBox.Diagonal;
var ls = new LineSegment(location, location + len*tangent);
Point p = Curve.GetAllIntersections(ls, loosePolyline, false)[0].IntersectionPoint;
Point del = tangent*(p - location).Length*0.5;
//Point del = tangent * this.OffsetForPolylineRelaxing * 2;
while (true) {
ls = new LineSegment(location, p + del);
bool foundIntersectionsOutsideOfSource = false;
foreach (IntersectionInfo ii in
IntersectionsOfLineAndRectangleNodeOverPolyline(ls, ObstacleCalculator.RootOfLooseHierarchy))
if (ii.Segment1 != loosePolyline) {
del /= 1.5;
foundIntersectionsOutsideOfSource = true;
break;
}
if (!foundIntersectionsOutsideOfSource)
break;
}
return ls.End;
}