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

NameDescription
Protected methodUxrSpline

Properties

NameDescription
Public propertyArcLength Gets the actual length of the curve.
Public propertyHasValidArcLengthData Gets whether the spline contains valid data in order to evaluate the curve using arc length parametrization.
Public propertyHasValidData Gets whether the spline contains valid data in order to evaluate the curve.
Public propertyUsePrecomputedSampleCount 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

NameDescription
Protected methodComputeArcLengthSamples Pre-computes a set of samples that will enable to evaluate the curve using arc-length parametrization.
Public methodEvaluate(Single, Vector3) Evaluates the curve
Public methodEvaluate(Single, Vector3, Vector3) Evaluates the curve
Public methodEvaluateUsingArcLength(Single, Vector3) Evaluates the curve using arc-length parametrization
Public methodEvaluateUsingArcLength(Single, Vector3, Vector3) Evaluates the curve using arc-length parametrization

Extension Methods

NameDescription
Public Extension MethodThrowIfNull Throws an exception if the object is null. (Defined by ObjectExt.)

See Also

Reference

UltimateXR.Animation.Splines Namespace