docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method EvaluateNurbs

    EvaluateNurbs(float, List<float3>, List<double>, int, out float3)

    Computes the interpolated position for NURBS defined by order, controlPoints, and knotVector at ratio t.

    Declaration
    public static bool EvaluateNurbs(float t, List<float3> controlPoints, List<double> knotVector, int order, out float3 position)
    Parameters
    Type Name Description
    float t

    The value between knotVector[0] and knotVector[-1] that represents the ratio along the curve.

    List<float3> controlPoints

    The control points for the NURBS.

    List<double> knotVector

    The knot vector for the NURBS. There must be at least order + controlPoints.Length - 1 knots.

    int order

    The order of the curve. For example, 4 for a cubic curve or 3 for quadratic.

    float3 position

    The output variable for the float3 position at t.

    Returns
    Type Description
    bool

    True if successful.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)