The Open Toolkit library  1.1
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Public Attributes | List of all members
OpenTK.BezierCurveQuadric Struct Reference

Represents a quadric bezier curve with two anchor and one control point. More...

Public Member Functions

 BezierCurveQuadric (Vector2 startAnchor, Vector2 endAnchor, Vector2 controlPoint)
 Constructs a new BezierCurveQuadric. More...
 
 BezierCurveQuadric (float parallel, Vector2 startAnchor, Vector2 endAnchor, Vector2 controlPoint)
 Constructs a new BezierCurveQuadric. More...
 
Vector2 CalculatePoint (float t)
 Calculates the point with the specified t. More...
 
float CalculateLength (float precision)
 Calculates the length of this bezier curve. More...
 

Public Attributes

Vector2 StartAnchor
 Start anchor point. More...
 
Vector2 EndAnchor
 End anchor point. More...
 
Vector2 ControlPoint
 Control point, controls the direction of both endings of the curve. More...
 
float Parallel
 The parallel value. More...
 

Detailed Description

Represents a quadric bezier curve with two anchor and one control point.

Constructor & Destructor Documentation

OpenTK.BezierCurveQuadric.BezierCurveQuadric ( Vector2  startAnchor,
Vector2  endAnchor,
Vector2  controlPoint 
)

Constructs a new BezierCurveQuadric.

Parameters
startAnchorThe start anchor.
endAnchorThe end anchor.
controlPointThe control point.
OpenTK.BezierCurveQuadric.BezierCurveQuadric ( float  parallel,
Vector2  startAnchor,
Vector2  endAnchor,
Vector2  controlPoint 
)

Constructs a new BezierCurveQuadric.

Parameters
parallelThe parallel value.
startAnchorThe start anchor.
endAnchorThe end anchor.
controlPointThe control point.

Member Function Documentation

float OpenTK.BezierCurveQuadric.CalculateLength ( float  precision)

Calculates the length of this bezier curve.

Parameters
precisionThe precision.
Returns
Length of curve.

The precision gets better when the precision value gets smaller.

Vector2 OpenTK.BezierCurveQuadric.CalculatePoint ( float  t)

Calculates the point with the specified t.

Parameters
tThe t value, between 0.0f and 1.0f.
Returns
Resulting point.

Member Data Documentation

Vector2 OpenTK.BezierCurveQuadric.ControlPoint

Control point, controls the direction of both endings of the curve.

Vector2 OpenTK.BezierCurveQuadric.EndAnchor

End anchor point.

float OpenTK.BezierCurveQuadric.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.

Vector2 OpenTK.BezierCurveQuadric.StartAnchor

Start anchor point.