Class SplineContainer
A component that holds a list of Spline objects.
Inherited Members
Namespace: UnityEngine.Splines
Assembly: solution.dll
Syntax
[AddComponentMenu("Splines/Spline Container")]
[ExecuteInEditMode]
public sealed class SplineContainer : MonoBehaviour, ISplineContainer, ISerializationCallbackReceiver
Properties
Name | Description |
---|---|
this[int] | Gets or sets the Spline at |
KnotLinkCollection | A collection of all linked knots. Linked knots can be on different splines. However, knots can only link to other knots within the same container. This collection is used to maintain the validity of the links when operations such as knot insertions or removals are performed on the splines. |
Spline | The main Spline attached to this component. |
Splines | The list of all splines attached to that container. |
Methods
Name | Description |
---|---|
CalculateLength() | Calculate the length of Spline in world space. |
CalculateLength(int) | Calculates the length of |
Evaluate(int, float, out float3, out float3, out float3) | Computes the interpolated position, direction and upDirection at ratio t for the spline at index |
Evaluate(float, out float3, out float3, out float3) | Computes interpolated position, direction and upDirection at ratio t. Calling this method to get the 3 vectors is faster than calling independently EvaluateSplinePosition, EvaluateSplineTangent and EvaluateSplineUpVector for the same time t as it reduces some redundant computation. |
EvaluateAcceleration(int, float) | Evaluates the acceleration vector of a point, t, on a spline at an index, `splineIndex, in world space. |
EvaluateAcceleration(float) | Evaluates the acceleration vector of a point, t, on a spline in world space. |
EvaluateAcceleration<T>(T, float) | Evaluates the acceleration vector of a point, t, on a given Spline, in world space. |
EvaluatePosition(int, float) | Evaluates the position of a point, t, on a spline at an index, |
EvaluatePosition(float) | Evaluates the position of a point, t, on a spline in world space. |
EvaluatePosition<T>(T, float) | Evaluates the position of a point, t, on a given spline, in world space. |
EvaluateTangent(int, float) | Evaluates the tangent vector of a point, t, on a spline at an index, |
EvaluateTangent(float) | Evaluates the tangent vector of a point, t, on a spline in world space. |
EvaluateTangent<T>(T, float) | Evaluates the tangent vector of a point, t, on a given spline, in world space. |
EvaluateUpVector(int, float) | Evaluates the up vector of a point, t, on a spline at an index, |
EvaluateUpVector(float) | Evaluates the up vector of a point, t, on a spline in world space. |
EvaluateUpVector<T>(T, float) | Evaluates the up vector of a point, t, on a given spline, in world space. |
Evaluate<T>(T, float, out float3, out float3, out float3) | Gets the interpolated position, direction, and upDirection at ratio t for a spline. This method gets the three vectors faster than EvaluateSplinePosition, EvaluateSplineTangent and EvaluateSplineUpVector for the same time t, because it reduces some redundant computation. |
OnAfterDeserialize() | See ISerializationCallbackReceiver. |
OnBeforeSerialize() | See ISerializationCallbackReceiver. |
Events
Name | Description |
---|---|
SplineAdded | Invoked any time a spline is added to the container. |
SplineRemoved | Invoked any time a spline is removed from the container. |
SplineReordered | Invoked any time a spline is reordered in the container. |