Struct Spline
Representes a spline.
Inherited Members
Namespace: Evergine.Mathematics
Assembly: Evergine.Mathematics.dll
Syntax
public struct Spline
  Constructors
Spline(Vector3, Vector3, Vector3, Vector3)
Initializes a new instance of the Spline struct.
Declaration
public Spline(Vector3 a, Vector3 b, Vector3 c, Vector3 d)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Vector3 | a | A point.  | 
      
| Vector3 | b | B point.  | 
      
| Vector3 | c | C point.  | 
      
| Vector3 | d | D point.  | 
      
Methods
CalculateCubicSpline(int, Vector3[])
Calculates the natural cubic spline of the control points. The segments are represented as: a + bu + cu^2 + d*u^3 algorithm adopted from: http://www.cse.unsw.edu.au/~lambert/splines/.
Declaration
public static Spline[] CalculateCubicSpline(int n, Vector3[] v)
  Parameters
| Type | Name | Description | 
|---|---|---|
| int | n | the number of control points.  | 
      
| Vector3[] | v | the array of vectors.  | 
      
Returns
| Type | Description | 
|---|---|
| Spline[] | The spline.  | 
      
CalculateCubicSpline(ref int, ref Vector3[], out Spline[])
Calculates the natural cubic spline of the control points. The segments are represented as: a + bu + cu^2 + d*u^3 algorithm adopted from: http://www.cse.unsw.edu.au/~lambert/splines/.
Declaration
public static void CalculateCubicSpline(ref int n, ref Vector3[] v, out Spline[] c)
  Parameters
| Type | Name | Description | 
|---|---|---|
| int | n | the number of control points.  | 
      
| Vector3[] | v | the array of vectors.  | 
      
| Spline[] | c | The c.  | 
      
GetPointOnSpline(float)
Evaluate the point using a cubic equation.
Declaration
public Vector3 GetPointOnSpline(float s)
  Parameters
| Type | Name | Description | 
|---|---|---|
| float | s | A distance.  | 
      
Returns
| Type | Description | 
|---|---|
| Vector3 | The point.  |