newton.viewer.RecorderImGuiManager#
- class newton.viewer.RecorderImGuiManager(renderer, recorder, example, window_pos=(10, 10), window_size=(300, 120))[source]#
Bases:
ImGuiManager
An ImGui manager for controlling simulation playback with a recorder.
This class provides a graphical user interface for controlling simulation playback, including pausing, resuming, scrubbing through frames, and saving/loading recordings. It also manages the visualization of contact points and updates the renderer according to the selected frame.
- __init__(renderer, recorder, example, window_pos=(10, 10), window_size=(300, 120))#
Initialize the RecorderImGuiManager.
- Parameters:
renderer – The renderer instance used for visualization.
recorder – The recorder object that stores simulation history.
example – The simulation example object (must have .paused and .frame_dt attributes).
window_pos (tuple, optional) – The (x, y) position of the ImGui window. Defaults to (10, 10).
window_size (tuple, optional) – The (width, height) of the ImGui window. Defaults to (300, 120).
- draw_ui()#
Draw the ImGui user interface for controlling playback and managing recordings.
This includes controls for pausing/resuming, frame navigation, saving, and loading.