Skip to main content

Bezier

A static class in Root.Township, Alta.Bezier.

Math for quadratic (3 point) and cubic (4 point) Bezier curves.

Methods​

MemberWhat it is
static Vector3 GetFirstDerivative(Vector3 p0, Vector3 p1, Vector3 p2, float t)Returns the curve's direction (tangent, not normalised) at t.
static Vector3 GetFirstDerivative(Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, float t)Returns the curve's direction (tangent, not normalised) at t.
static Vector3 GetPoint(Vector3 p0, Vector3 p1, Vector3 p2, float t)Returns the point on the curve at t, clamped to 0 to 1.
static Vector3 GetPoint(Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, float t)Returns the point on the curve at t, clamped to 0 to 1.