Class SplineData<T>
The SplineData{T} class is used to store information relative to a Spline without coupling data directly to the Spline class. SplineData can store any type of data, and provides options for how to index DataPoints.
Inherited Members
Namespace: UnityEngine .Splines
Assembly: solution.dll
Syntax
[Serializable]
public class SplineData<T> : IEnumerable<DataPoint<T>>, IEnumerable
Type Parameters
Name | Description |
---|---|
T | The type of data to store. |
Constructors
Name | Description |
---|---|
Spline |
Create a new SplineData instance. |
Spline |
Create a new SplineData instance and initialize it with a collection of data points. DataPoints will be sorted and stored in ascending order by Index. |
Spline |
Create a new SplineData instance with a single value in it. |
Properties
Name | Description |
---|---|
Count | How many data points the SplineData collection contains. |
Default |
Default value to use when a new DataPoint is automatically added. |
Indexes | The DataPoint Indexes of the current SplineData. |
this[int] | Access a Data |
Path |
PathIndexUnit defines how SplineData will interpret 't' values when interpolating data. |
Methods
Name | Description |
---|---|
Add(float, T) | Append a Data |
Add(Data |
Append a Data |
Add |
Append a Data |
Clear() | Remove all data points. |
Convert |
Given a spline and a target PathIndex Unit, convert the SplineData to a new PathIndexUnit without changing the final positions on the Spline. |
Evaluate<TSpline, TInterpolator>(TSpline, float, Path |
Calculate an interpolated value at a given 't' along a spline. |
Evaluate<TSpline, TInterpolator>(TSpline, float, TInterpolator) | Calculate an interpolated value at a given 't' along a spline. |
Get |
Returns an enumerator that iterates through the DataPoints collection. |
Get |
Given a time value using a certain PathIndexUnit type, calculate the normalized time value regarding a specific spline. |
Move |
Move a Data |
Remove |
Remove a Data |
Remove |
Remove a Data |
Set |
Set the data for a Data |
Set |
Set the data for a Data |
Sort |
Triggers sorting of the Data |
Events
Name | Description |
---|---|
Changed | Invoked any time a SplineData is modified. |