C# Class OpenTK.BezierCurveCubic

Mostra file Open project: prepare/HTML-Renderer Class Usage Examples

Public Properties

Property Type Description
EndAnchor System.Vector2
FirstControlPoint System.Vector2
Parallel float
SecondControlPoint System.Vector2
StartAnchor System.Vector2

Public Methods

Method Description
BezierCurveCubic ( System.Vector2 startAnchor, System.Vector2 endAnchor, System.Vector2 firstControlPoint, System.Vector2 secondControlPoint ) : System

Constructs a new BezierCurveCubic.

BezierCurveCubic ( float parallel, System.Vector2 startAnchor, System.Vector2 endAnchor, System.Vector2 firstControlPoint, System.Vector2 secondControlPoint ) : System

Constructs a new BezierCurveCubic.

CalculateLength ( float precision ) : float

Calculates the length of this bezier curve.

The precision gets better when the precision value gets smaller.

CalculatePoint ( float t ) : System.Vector2

Calculates the point with the specified t.

Private Methods

Method Description
CalculatePointOfDerivative ( float t ) : System.Vector2

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

Method Details

BezierCurveCubic() public method

Constructs a new BezierCurveCubic.
public BezierCurveCubic ( System.Vector2 startAnchor, System.Vector2 endAnchor, System.Vector2 firstControlPoint, System.Vector2 secondControlPoint ) : System
startAnchor System.Vector2 The start anchor point.
endAnchor System.Vector2 The end anchor point.
firstControlPoint System.Vector2 The first control point.
secondControlPoint System.Vector2 The second control point.
return System

BezierCurveCubic() public method

Constructs a new BezierCurveCubic.
public BezierCurveCubic ( float parallel, System.Vector2 startAnchor, System.Vector2 endAnchor, System.Vector2 firstControlPoint, System.Vector2 secondControlPoint ) : System
parallel float The parallel value.
startAnchor System.Vector2 The start anchor point.
endAnchor System.Vector2 The end anchor point.
firstControlPoint System.Vector2 The first control point.
secondControlPoint System.Vector2 The second control point.
return System

CalculateLength() public method

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.
return float

CalculatePoint() public method

Calculates the point with the specified t.
public CalculatePoint ( float t ) : System.Vector2
t float The t value, between 0.0f and 1.0f.
return System.Vector2

Property Details

EndAnchor public_oe property

End anchor point.
public Vector2,System EndAnchor
return System.Vector2

FirstControlPoint public_oe property

First control point, controls the direction of the curve start.
public Vector2,System FirstControlPoint
return System.Vector2

Parallel public_oe property

Gets or sets 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
return float

SecondControlPoint public_oe property

Second control point, controls the direction of the curve end.
public Vector2,System SecondControlPoint
return System.Vector2

StartAnchor public_oe property

Start anchor point.
public Vector2,System StartAnchor
return System.Vector2