scoop:scoop.surface:0.1.0
src/shared/input/hit.scoop
Selected production source · src/shared/input/hit.scoop
1
package scoop.surface3
import scoop.graphics.Point5
/** An owned route entry with coordinates from the same accepted scene. */6
public struct InputHit(val scope: InputScope, val localPosition: Point?)8
internal fun InputRouter.hitInput(point: Point): Array<InputHit> {9
checkThread()10
if (closed || !point.x.isFinite() || !point.y.isFinite())11
return []12
val route = deliveries(hit(point), Some(point))13
return Array<InputHit>(route.size) {14
index ->15
val value = route[index]16
InputHit(value.scope, value.position)17
}18
}