Search Results for

    Show / Hide Table of Contents

    Struct Spline

    Represents a spline.

    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

    Point A.

    Vector3 b

    Point B.

    Vector3 c

    Point C.

    Vector3 d

    Point D.

    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)

    Evaluates 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.

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX