getTangent method

  1. @override
dynamic getTangent(
  1. dynamic t, [
  2. dynamic optionalTarget
])
override

Implementation

@override
getTangent(t, [optionalTarget]) {
  var tangent = optionalTarget ?? Vector3();

  var u = knots[0] + t * (knots[knots.length - 1] - knots[0]);
  var ders = calcNURBSDerivatives(degree, knots, controlPoints, u, 1);
  tangent.copy(ders[1]).normalize();

  return tangent;
}