pick_pixel#

NyxPyRenderer.pick_pixel(pair_list, camera_index, x, y)[source]#

Cast a ray through one pixel and return the entity and hit point.

Wraps the native gs_nyx.nyx_py_renderer.NyxRenderer.pick_pixel() and translates Nyx’s UUID + Y-up hit location back to Genesis world space.

Parameters:
  • pair_list (list of tuple) – (entity, uuid) pairs from NyxSceneExporter. Used to convert the picked UUID back into a Genesis entity.

  • camera_index (int) – Camera to cast through. Matches the index used by render().

  • x (int) – Pixel coordinates with the origin at the top-left of the camera’s framebuffer.

  • y (int) – Pixel coordinates with the origin at the top-left of the camera’s framebuffer.

Return type:

Optional[tuple[Entity, str, tuple[float, float, float]]]

Returns:

tuple or NoneNone if the ray missed all geometry. Otherwise a 3-tuple (entity, node_name, position):

  • entity — the Genesis entity that was hit

  • node_name — link / subgeometry name (URDF: link name; MJCF: "<link>_<vgeom_idx>"; otherwise empty)

  • position — world-space hit point as (x, y, z) in Genesis Z-up coordinates