computeDistanceToOut method

  1. @override
double computeDistanceToOut(
  1. Transform xf,
  2. Vector2 p,
  3. int childIndex,
  4. Vector2 normalOut,
)
override

Compute the distance from the current shape to the specified point. This only works for convex shapes.

xf is the shape world transform. p is a point in world coordinates. normalOut returns the direction in which the distance increases. Returns the distance from the current shape.

Implementation

@override
double computeDistanceToOut(
  Transform xf,
  Vector2 p,
  int childIndex,
  Vector2 normalOut,
) {
  final edge = childEdge(childIndex);
  return edge.computeDistanceToOut(xf, p, 0, normalOut);
}