C# 클래스 Methods.LineSweepPoint.GeometryUtil

파일 보기 프로젝트 열기: Strilanc/Methods

공개 메소드들

메소드 설명
LerpProjectOnto ( this point, LineSegment line ) : double

The proportion that, when lerped across the given line, results in the given point. If the point is not on the line segment, the result is the closest point on the extended line.

QuadraticRoots ( double a, double b, double c ) : IEnumerable

Enumerates the real solutions to the formula a*x^2 + b*x + c = 0. Handles degenerate cases. If a=b=c=0 then only zero is enumerated, even though technically all real numbers are solutions.

WhenLineSweepsPoint ( LineSegment pathOfLineStartPoint, LineSegment pathOfLineEndPoint, Point point ) : IEnumerable

Enumerates the times and places, if any, where a moving line crosses a point during a time step. The line's endpoints move at a constant rate along their linear paths.

메소드 상세

LerpProjectOnto() 공개 정적인 메소드

The proportion that, when lerped across the given line, results in the given point. If the point is not on the line segment, the result is the closest point on the extended line.
public static LerpProjectOnto ( this point, LineSegment line ) : double
point this
line LineSegment
리턴 double

QuadraticRoots() 공개 정적인 메소드

Enumerates the real solutions to the formula a*x^2 + b*x + c = 0. Handles degenerate cases. If a=b=c=0 then only zero is enumerated, even though technically all real numbers are solutions.
public static QuadraticRoots ( double a, double b, double c ) : IEnumerable
a double
b double
c double
리턴 IEnumerable

WhenLineSweepsPoint() 공개 정적인 메소드

Enumerates the times and places, if any, where a moving line crosses a point during a time step. The line's endpoints move at a constant rate along their linear paths.
public static WhenLineSweepsPoint ( LineSegment pathOfLineStartPoint, LineSegment pathOfLineEndPoint, Point point ) : IEnumerable
pathOfLineStartPoint LineSegment
pathOfLineEndPoint LineSegment
point Point
리턴 IEnumerable