This in preparation for an upcoming change that uses native file dialogs instead
of our very basic ImGui file dialog.
PiperOrigin-RevId: 861671041
Change-Id: I9b00c05efdda5e37ffe15048a2ccf66f6eca89d9
Update SetFrameBuffer to allow users to customize which swap chain
(window or offscreen) to use for rendering both the main mjvScene
as well as the GUI.
PiperOrigin-RevId: 861624061
Change-Id: Ife7bfc447afb007016300438fc5f88a8e4cfa0f6
Resource operations (e.g. mju_openResource, mju_readResource, and
mju_closeResource, etc.) are now all handled by a VFS instance. It
is now up to the VFS to determine which provider to use in order to
handle those operations.
This allows us to dynamically add/remove (aka "mount") providers to
a VFS to handle special requests. mj_addFileVFS and mj_addBufferVFS
have been reimplemented as two such use-cases. Moreover, we expose
the mounting behaviour with two new functions: mj_mountVFS and
mj_unmountVFS.
PiperOrigin-RevId: 861550939
Change-Id: I070eb4bcc2982466c8f368f7918005538baa5185
Removed the GIL lock in set_figures, clear_figures, set_texts, clear_texts, set_images, and clear_images
PiperOrigin-RevId: 861245200
Change-Id: I52f21d82f9813752c7cb357213c24ea6188583db
The dense Jacobian arrays `J0_dense` and `J1_dense` are now zeroed only once before the vertex loop. Inside the loop, only the entries that were actually used are zeroed out after being added to the sparse Jacobian, allowing for efficient reuse of the dense arrays across all vertices.
PiperOrigin-RevId: 860799056
Change-Id: Ia61daae5eeb2f4dbc0c5d8c0064622a881e92b7a
Use unsigned size_t instead of signed mjtSize for size multiplications to avoid Clang's overflow-checking intrinsic. This is semantically correct as size calculations are inherently unsigned.
PiperOrigin-RevId: 860213177
Change-Id: I837aa6556335478969d4977492d0f231419f020a
Use unsigned size_t instead of signed mjtSize for size multiplications to avoid Clang's overflow-checking intrinsic. This is semantically correct as size calculations are inherently unsigned.
PiperOrigin-RevId: 860172221
Change-Id: I3b6cb720db8771b8f266f1927e2980ac7514538b
This change updates all size-related members within the `mjModel` struct from `int` to `mjtSize`. This allows MuJoCo to handle models with a larger number of elements. Corresponding changes were made to macros, function signatures, and I/O routines to accommodate the new `mjtSize` type.
PiperOrigin-RevId: 860144595
Change-Id: I701c6d607715d240766b6210a9773cd9e4258c59
This change adds an Emscripten binding for loading binary MuJoCo models (`.mjb`) from the virtual filesystem. The new binding, `mj_loadBinary`, takes a filename and an `MjVFS` object, enabling the loading of models that reference assets within the VFS.
PiperOrigin-RevId: 859740455
Change-Id: I9f9d8bbba0b57422e2356867e4282a1b04566475
There are three ways to load a model: from a file, from a buffer, or an
"empty" model. Instead of overloading a single function to do all three,
provide three separate functions.
Also disable model loading functions that will not work for emscripten.
PiperOrigin-RevId: 859051341
Change-Id: I71557d31d0e7c9c6882895c36116d300f19e255d
The ImGui table API cell padding variables can be used to adjust the positioning of the UI in the box.
PiperOrigin-RevId: 858137824
Change-Id: I1ce1519c0abd67bc5fafc30f9a18dfcf18c2a313
This change introduces two new USD API schema:
* MjcEqualityAPI - base API for representing MuJoCo equality constraints in USD, this will typically be applied to joints such as UsdPhysicsFixedJoint.
* MjcEqualityWeldAPI - extends MjcEqualityAPI for MuJoCo's weld equality constraints with an attribute for torqueScale.
The usd_decoder is updated to parse UsdPhysicsFixedJoints and convert the new schema attributes into the appropriate mjsEquality data fields.
PiperOrigin-RevId: 856723634
Change-Id: I0982fd3168b643f8e91d87bb5ae5933e526b63a1