pick
Casts a single ray into the scene at raster pixel coordinate point, with (0,0) in the bottom left corner. Returns an array that contains information about any objects hit by the ray. Only objects that have the pickable attribute set are considered. If the optional argument "size" is provided then the pick occurs over a rectangle of that size centered at "point".
arguments
- "max_levels" : Uint32 (default: 1)
Controls the number of rays that may be cast, per ray, during the picking operation. A level of 1 will only trace primary rays. Any other value will continue tracing rays through the scene until nothing was hit or the maximum depth is exhausted, with a value of 0 indicating unconstrained depth.
- "point" : Float32<2>
The picked 2D point in screenspace.
- "render_context_name" : String (default: null)
The name of the render context to use.
- "render_context_timeout" : Uint32 (default: 0)
The timeout for the named render context.
- "renderer" : String (default: null)
Override the renderer specified in the scene options.
Possible Values:
- iray
- irt
- ogl
- blend
- "scene_name" : String
The name of the scene to pick into.
- "size" : Float32<2> (default: null)
The size of the area to pick in screenspace coordinates. If specified, then a rectangle centered around "point" will be picked rather than just a single point.
return value
Pick_result[]An array of pick results containing data about all objects hit by the cast ray. The array is ordered closest to furtherest pick result. Each pick result contains the name of the object hit, the world position of that object and the names of all the elements on the path from the root group to the picked object.