Interface ISpline
ISpline defines the interface from which Spline types inherit.
Namespace: UnityEngine.Splines
Syntax
public interface ISpline
Properties
Closed
Whether the spline is open (has a start and end point) or closed (forms an unbroken loop).
Declaration
bool Closed { get; }
Property Value
Type | Description |
---|---|
Boolean |
Item[Int32]
Get the knot at index
.
Declaration
BezierKnot this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The zero-based index of the knot. |
Property Value
Type | Description |
---|---|
BezierKnot |
KnotCount
Return the number of knots.
Declaration
int KnotCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
GetCurve(Int32)
Get a BezierCurve from a knot index.
Declaration
BezierCurve GetCurve(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The knot index that serves as the first control point for this curve. |
Returns
Type | Description |
---|---|
BezierCurve | A BezierCurve formed by the knot at index and the next knot. |
GetCurveLength(Int32)
Return the length of a curve.
Declaration
float GetCurveLength(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index |
Returns
Type | Description |
---|---|
Single |
See Also
GetLength()
Return the sum of all curve lengths, accounting for Closed state.
Declaration
float GetLength()
Returns
Type | Description |
---|---|
Single | Returns the sum length of all curves composing this spline, accounting for closed state. |