C# 클래스 burningmime.curves.SplineBuilder

Wraps a CurveBuilder and Spline together. Allows you to add data points as they come in and generate a smooth spline from them without doing unnecessary computation.
파일 보기 프로젝트 열기: prepare/HTML-Renderer

공개 메소드들

메소드 설명
Add ( System.Windows.Vector p ) : bool

Adds a data point.

Clear ( ) : void

Clears the SplineBuilder.

Sample ( System.Double u ) : System.Windows.Vector

Gets the position of a point on the spline that's close to the desired point along the spline. For example, if u = 0.5, then a point that's about halfway through the spline will be returned. The returned point will lie exactly on one of the curves that make up the spline.

SplineBuilder ( System.Double pointDistance, System.Double error, int samplesPerCurve ) : System.Diagnostics
Tangent ( System.Double u ) : System.Windows.Vector

Gets the tangent of a point on the spline that's close to the desired point along the spline. For example, if u = 0.5, then the direction vector that's about halfway through the spline will be returned. The returned value will be a normalized direction vector.

메소드 상세

Add() 공개 메소드

Adds a data point.
public Add ( System.Windows.Vector p ) : bool
p System.Windows.Vector Data point to add.
리턴 bool

Clear() 공개 메소드

Clears the SplineBuilder.
public Clear ( ) : void
리턴 void

Sample() 공개 메소드

Gets the position of a point on the spline that's close to the desired point along the spline. For example, if u = 0.5, then a point that's about halfway through the spline will be returned. The returned point will lie exactly on one of the curves that make up the spline.
public Sample ( System.Double u ) : System.Windows.Vector
u System.Double How far along the spline to sample (for example, 0.5 will be halfway along the length of the spline). Should be between 0 and 1.
리턴 System.Windows.Vector

SplineBuilder() 공개 메소드

public SplineBuilder ( System.Double pointDistance, System.Double error, int samplesPerCurve ) : System.Diagnostics
pointDistance System.Double
error System.Double
samplesPerCurve int
리턴 System.Diagnostics

Tangent() 공개 메소드

Gets the tangent of a point on the spline that's close to the desired point along the spline. For example, if u = 0.5, then the direction vector that's about halfway through the spline will be returned. The returned value will be a normalized direction vector.
public Tangent ( System.Double u ) : System.Windows.Vector
u System.Double How far along the spline to sample (for example, 0.5 will be halfway along the length of the spline). Should be between 0 and 1.
리턴 System.Windows.Vector