Show / Hide Table of Contents

Struct BezierCurveQuadric

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

Inherited Members
ValueType.Equals(Object)
ValueType.GetHashCode()
ValueType.ToString()
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetType()
Namespace: OpenTK
Assembly: OpenTK.dll
Syntax
[Serializable]
public struct BezierCurveQuadric

Constructors

BezierCurveQuadric(Vector2, Vector2, Vector2)

Constructs a new BezierCurveQuadric.

Declaration
public BezierCurveQuadric(Vector2 startAnchor, Vector2 endAnchor, Vector2 controlPoint)
Parameters
Type Name Description
Vector2 startAnchor

The start anchor.

Vector2 endAnchor

The end anchor.

Vector2 controlPoint

The control point.

BezierCurveQuadric(Single, Vector2, Vector2, Vector2)

Constructs a new BezierCurveQuadric.

Declaration
public BezierCurveQuadric(float parallel, Vector2 startAnchor, Vector2 endAnchor, Vector2 controlPoint)
Parameters
Type Name Description
Single parallel

The parallel value.

Vector2 startAnchor

The start anchor.

Vector2 endAnchor

The end anchor.

Vector2 controlPoint

The control point.

Fields

ControlPoint

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

Declaration
public Vector2 ControlPoint
Field Value
Type Description
Vector2

EndAnchor

End anchor point.

Declaration
public Vector2 EndAnchor
Field Value
Type Description
Vector2

Parallel

The parallel value.

Declaration
public float Parallel
Field Value
Type Description
Single
Remarks

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.

StartAnchor

Start anchor point.

Declaration
public Vector2 StartAnchor
Field Value
Type Description
Vector2

Methods

CalculateLength(Single)

Calculates the length of this bezier curve.

Declaration
public float CalculateLength(float precision)
Parameters
Type Name Description
Single precision

The precision.

Returns
Type Description
Single

Length of curve.

Remarks

The precision gets better when the precision value gets smaller.

CalculatePoint(Single)

Calculates the point with the specified t.

Declaration
public Vector2 CalculatePoint(float t)
Parameters
Type Name Description
Single t

The t value, between 0.0f and 1.0f.

Returns
Type Description
Vector2

Resulting point.

In This Article
Back to top Generated by DocFX