Class BSplineHelper
- Namespace
- FluffyUnderware.Curvy
Static methods used in the implementation of B-Splines
public static class BSplineHelper
- Inheritance
-
BSplineHelper
Methods
DeBoorClamped(int, int, float, int, Vector3[])
De Boor algorithm for clamped B-Splines. parameter names taken from https://pages.mtu.edu/~shene/COURSES/cs3621/NOTES/spline/B-spline/de-Boor.html. This is a variant of that implementation, explained in the english De Boor's page in Wikipedia
public static Vector3 DeBoorClamped(int p, int k, float u, int nPlus1, Vector3[] pArray)
Parameters
Returns
- Vector3
DeBoorUnclamped(int, int, float, Vector3[])
De Boor algorithm for unclamped B-Splines. parameter names taken from https://pages.mtu.edu/~shene/COURSES/cs3621/NOTES/spline/B-spline/de-Boor.html. This is a variant of that implementation, explained in the english De Boor's page in Wikipedia
public static Vector3 DeBoorUnclamped(int p, int k, float u, Vector3[] pArray)
Parameters
Returns
- Vector3
GetBSplineN(int, int, bool)
Get the N number as defined in the B-Spline section here: https://pages.mtu.edu/~shene/COURSES/cs3621/NOTES/
public static int GetBSplineN(int controlPointsCount, int degree, bool closed)
Parameters
Returns
GetBSplineUAndK(float, bool, int, int, out float, out int)
Get the the U and K numbers as defined in the B-Spline section, De Boor's algorithm, here: https://pages.mtu.edu/~shene/COURSES/cs3621/NOTES/
public static void GetBSplineUAndK(float tf, bool isClamped, int p, int n, out float u, out int k)