C# Класс PixelFarm.VectorMath.BezierCurveQuadric

Represents a quadric bezier curve with two anchor and one control point.
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
ControlPoint Vector2
EndAnchor Vector2
Parallel float
StartAnchor Vector2

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

Метод Описание
BezierCurveQuadric ( Vector2 startAnchor, Vector2 endAnchor, Vector2 controlPoint )

Constructs a new BezierCurveQuadric.

BezierCurveQuadric ( float parallel, Vector2 startAnchor, Vector2 endAnchor, Vector2 controlPoint )

Constructs a new BezierCurveQuadric.

CalculateLength ( float precision ) : float

Calculates the length of this bezier curve.

The precision gets better when the precision value gets smaller.

CalculatePoint ( float t ) : Vector2

Calculates the point with the specified t.

Приватные методы

Метод Описание
CalculatePointOfDerivative ( float t ) : Vector2

Calculates the point with the specified t of the derivative of this function.

Описание методов

BezierCurveQuadric() публичный Метод

Constructs a new BezierCurveQuadric.
public BezierCurveQuadric ( Vector2 startAnchor, Vector2 endAnchor, Vector2 controlPoint )
startAnchor Vector2 The start anchor.
endAnchor Vector2 The end anchor.
controlPoint Vector2 The control point.

BezierCurveQuadric() публичный Метод

Constructs a new BezierCurveQuadric.
public BezierCurveQuadric ( float parallel, Vector2 startAnchor, Vector2 endAnchor, Vector2 controlPoint )
parallel float The parallel value.
startAnchor Vector2 The start anchor.
endAnchor Vector2 The end anchor.
controlPoint Vector2 The control point.

CalculateLength() публичный Метод

Calculates the length of this bezier curve.
The precision gets better when the precision value gets smaller.
public CalculateLength ( float precision ) : float
precision float The precision.
Результат float

CalculatePoint() публичный Метод

Calculates the point with the specified t.
public CalculatePoint ( float t ) : Vector2
t float The t value, between 0.0f and 1.0f.
Результат Vector2

Описание свойств

ControlPoint публичное свойство

Control point, controls the direction of both endings of the curve.
public Vector2 ControlPoint
Результат Vector2

EndAnchor публичное свойство

End anchor point.
public Vector2 EndAnchor
Результат Vector2

Parallel публичное свойство

The parallel value.
This value defines whether the curve should be calculated as a parallel curve to the original bezier curve. A value of 0.0f represents the original curve, 5.0f i.e. stands for a curve that has always a distance of 5.f to the orignal curve at any point.
public float Parallel
Результат float

StartAnchor публичное свойство

Start anchor point.
public Vector2 StartAnchor
Результат Vector2