Back to Filament

pick

docs/android/dokka/filament-android/com.google.android.filament/-view/pick.md

1.75.01.2 KB
Original Source

//filament-android/com.google.android.filament/View/pick

pick

[main]
open fun pick(x: Int, y: Int, handler: Any, callback: View.OnPickCallback)

Creates a picking query. Multiple queries can be created (e.g.: multi-touch). Picking queries are all executed when render is called on this View. The provided callback is guaranteed to be called at some point in the future. Typically it takes a couple frames to receive the result of a picking query.

Parameters

main

xHorizontal coordinate to query in the viewport with origin on the left.
yVertical coordinate to query on the viewport with origin at the bottom.
handlerAn Executor. On Android this can also be a Handler.
callbackUser callback executed by handler when the picking query result is available.