UxrSpline Class
Spline base class. We use splines to interpolate smoothly between a set of points. Interpolation can be done using the traditional t [0.0f, 1.0f] parameter and also distances to allow arc-length evaluation.
Inheritance Hierarchy
System.Object
UltimateXR.Animation.Splines.UxrSpline
UltimateXR.Animation.Splines.UxrCatmullRomSpline
Namespace: UltimateXR.Animation.Splines
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
public abstract class UxrSpline
The UxrSpline type exposes the following members.
Constructors
Name | Description | |
---|---|---|
UxrSpline |
Properties
Name | Description | |
---|---|---|
ArcLength | Gets the actual length of the curve. | |
HasValidArcLengthData | Gets whether the spline contains valid data in order to evaluate the curve using arc length parametrization. | |
HasValidData | Gets whether the spline contains valid data in order to evaluate the curve. | |
UsePrecomputedSampleCount | Number of curve samples that are going to be pre-computed in order to enable arc length parametrization. This method must be called before creating the spline and will enable EvaluateUsingArcLength() calls. For short splines the default value is enough. For very long splines it may be required to increase the sample count. |
Methods
Name | Description | |
---|---|---|
ComputeArcLengthSamples | Pre-computes a set of samples that will enable to evaluate the curve using arc-length parametrization. | |
Evaluate(Single, Vector3) | Evaluates the curve | |
Evaluate(Single, Vector3, Vector3) | Evaluates the curve | |
EvaluateUsingArcLength(Single, Vector3) | Evaluates the curve using arc-length parametrization | |
EvaluateUsingArcLength(Single, Vector3, Vector3) | Evaluates the curve using arc-length parametrization |
Extension Methods
Name | Description | |
---|---|---|
ThrowIfNull | Throws an exception if the object is null. (Defined by ObjectExt.) |