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.
Показать файл Открыть проект

Открытые методы

Метод Описание
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