Struct BezierKnot
This struct contains position and tangent data for a knot. The position is a scalar point and the tangents are vectors. The Spline class stores a collection of BezierKnot that form a series of connected BezierCurve. Each knot contains a Position, Tangent In, and Tangent Out. When a spline is not closed, the first and last knots will contain an extraneous tangent (in and out, respectively).
Inherited Members
Namespace: UnityEngine.Splines
Assembly: solution.dll
Syntax
[Serializable]
public struct BezierKnot : ISerializationCallbackReceiver, IEquatable<BezierKnot>
Constructors
Name | Description |
---|---|
BezierKnot(float3) | Create a new BezierKnot struct. |
BezierKnot(float3, float3, float3) | Creates a new BezierKnot struct. |
BezierKnot(float3, float3, float3, quaternion) | Create a new BezierKnot struct. |
Fields
Name | Description |
---|---|
Position | The position of the knot. On a cubic Bezier curve, this is equivalent to P0 or P3, depending on whether this knot is forming the first or second control point of the curve. |
Rotation | Rotation of the knot. |
TangentIn | The tangent vector that leads into this knot. On a cubic Bezier curve, this value is used to calculate P2 when used as the second knot in a curve. |
TangentOut | The tangent vector that follows this knot. On a cubic Bezier curve, this value is used to calculate P1 when used as the first knot in a curve. |
Methods
Name | Description |
---|---|
Equals(object) | Compare against an object for equality. |
Equals(BezierKnot) | Compare two knots for equality. |
GetHashCode() | Calculate a hash code for this knot. |
OnAfterDeserialize() | See ISerializationCallbackReceiver. |
OnBeforeSerialize() | See ISerializationCallbackReceiver. |
ToString() | Create a string with the values of this knot. |
Transform(float4x4) | Multiply the position and tangents by a matrix. |
Operators
Name | Description |
---|---|
operator +(BezierKnot, float3) | Knot position addition. This operation only applies to the position, tangents and rotation are unmodified. |
operator -(BezierKnot, float3) | Knot position subtraction. This operation only applies to the position, tangents and rotation are unmodified. |