float2 | point | The start of the line. |
float2 | direction | The direction of the line. |
float | maxRadius | The maximum radius of the circle. |
NativeArray<float2> | edges | The edges to check for intersection with. |
float | bias | Point on the line where the circle will be inflated from. |
float2 | inputRange | The range of the line on which the center of the circle may be. These values may be positive, negative, and even infinite. But y must be greater or equal to x. |
)
Pushes a circle along a line until it no longer intersects with any edges.
Imagine that you have a balloon at the point point + direction*bias. The balloon may only move along the line from point + direction*inputRange.x to point + direction*inputRange.y. The balloon starts uninflated, but now imagine that you start inflating it. The balloon will inflate like a circle until it intersects with an edge and then when we continue inflating it, we will necessarily have to move the balloon's center since the edge is in the way. We continue like like until we cannot inflate the balloon any further, or we reach the maximum radius. The return value contains the range of the balloon's center along the line and the radius of the balloon.