newton.viewer.GizmoSystem#

class newton.viewer.GizmoSystem(renderer, scale_factor=1.0, rotation_sensitivity=0.01, max_gizmos=800)[source]#

Bases: object

Manages collection of interactive gizmos.

__init__(renderer, scale_factor=1.0, rotation_sensitivity=0.01, max_gizmos=800)#
create_target(target_id, position, rotation=None, world_offset=None)#

Create a new gizmo target.

finalize()#

Finalize gizmo allocation after all targets are created.

on_mouse_drag(x, y, dx, dy, button, modifiers)#

Handle mouse drag events.

on_mouse_press(x, y, button, modifiers)#

Handle mouse press events.

on_mouse_release(x, y, button, modifiers)#

Handle mouse release events.

set_callbacks(position_callback=None, rotation_callback=None)#

Set callbacks for position/rotation changes.

update_target_position(target_id, position)#

Update target position.

update_target_rotation(target_id, rotation)#

Update target rotation.