getGradientStartAndEndPoints method

Tuple2<Vector3, Vector3> getGradientStartAndEndPoints()

Implementation

Tuple2<Vector3, Vector3> getGradientStartAndEndPoints() {
  var direction = RIGHT;
  var c = getCenter();

  var bases = Array(values: [
    for (var vec in [RIGHT, UP, OUT]) (getEdgeCenter(vec) - c).toList()
  ]).T;

  var offset = direction.matMul(bases);
  return Tuple2(c - offset, c + offset);
}