Add update_{hfield,mesh,texture} methods to the passive viewer.

Fixes #812.
Fixes #958.
Fixes #965.

PiperOrigin-RevId: 548181282
Change-Id: I6eb0cd2ce52c66083e83dd08d69e0cfb4178dbba
This commit is contained in:
Saran Tunyasuvunakool
2023-07-14 11:42:55 -07:00
committed by Copybara-Service
parent b5bef1b639
commit 0ccfef7314
6 changed files with 153 additions and 55 deletions
+6
View File
@@ -113,6 +113,12 @@ attributes:
also transfers user inputs from the GUI back into ``mjOption`` (inside ``mjModel``) and ``mjData``, including
enable/disable flags, control inputs, and mouse perturbations.
- ``update_hfield(hfieldid)``: updates the height field data at the specified ``hfieldid`` for subsequent renderings.
- ``update_mesh(meshid)``: updates the mesh data at the specified ``meshid`` for subsequent renderings.
- ``update_texture(texid)``: updates the texture data at the specified ``texid`` for subsequent renderings.
- ``close()``: programmatically closes the viewer window. This method can be safely called without locking.
- ``is_running()``: returns ``True`` if the viewer window is running and ``False`` if it is closed.