Struct BezierCurve
Control points for a cubic Bezier curve.
Points P0 through P3 are in sequential order, describing the starting point, second, third, and ending controls for a cubic Bezier curve.
Implements
Inherited Members
Namespace: UnityEngine.Splines
Assembly: solution.dll
Syntax
public struct BezierCurve : IEquatable<BezierCurve>
Constructors
Name | Description |
---|---|
BezierCurve(float3, float3) | Construct a cubic Bezier curve from a linear curve. A linear curve is a straight line. |
BezierCurve(float3, float3, float3) | Construct a cubic Bezier curve by elevating a quadratic curve. |
BezierCurve(float3, float3, float3, float3) | Construct a cubic Bezier curve from a series of control points. |
BezierCurve(BezierKnot, BezierKnot) | Construct a cubic Bezier curve from a start and end BezierKnot. |
Fields
Name | Description |
---|---|
P0 | First control point. |
P1 | Second control point. Subtract P0 from P1 to derive the first tangent for a curve. |
P2 | Third control point. Subtract P3 from P2 to derive the second tangent for a curve. |
P3 | Fourth control point. |
Properties
Name | Description |
---|---|
Tangent0 | The direction and magnitude of the first tangent in a cubic curve. |
Tangent1 | The direction and magnitude of the second tangent in a cubic curve. |
Methods
Name | Description |
---|---|
Equals(object) | Compare against an object for equality. |
Equals(BezierCurve) | Compare two curves for equality. |
FromTangent(float3, float3, float3, float3) | Create a BezierCurve from a start and end point plus tangent directions. |
GetHashCode() | Calculate a hash code for this curve. |
GetInvertedCurve() | Gets the same BezierCurve but in the opposite direction. |
Transform(float4x4) | Multiply the curve positions by a matrix. |
Operators
Name | Description |
---|---|
operator ==(BezierCurve, BezierCurve) | Compare two curves for equality. |
operator !=(BezierCurve, BezierCurve) | Compare two curves for inequality. |