Improve flex rendering.

RenderableManager is responsible for rendering the "skinned" flexes
which represent the correct "final" look of a flex. This now includes
1D flexes which are rendered as a sequence of capsules (similar to
tendons).

SceneDecorator is responsible for rendering the debug (unskinned)
versions of flexes. This includes the vertices (small spheres for each
vertex), edges (thin cynlinders for each edge), and faces (triangles
for each face, including sublayers).

PiperOrigin-RevId: 951595046
Change-Id: Iebc6fd7a747a602813b6457333bd9fa5915e28d3
This commit is contained in:
Haroon Qureshi
2026-07-21 11:14:47 -07:00
committed by Copybara-Service
parent 7bfa10e1e2
commit a8545ac7cc
6 changed files with 310 additions and 232 deletions
+1 -3
View File
@@ -25,9 +25,7 @@ namespace mujoco {
// Creates a mjrfMesh for the given flex object.
UniquePtr<mjrfMesh> CreateFlexMesh(mjrfContext* ctx, const mjModel* model,
const mjData* data, int flex_id,
int flex_layer, bool smooth_skinning,
bool generate_edges, bool generate_vertices);
const mjData* data, int flex_id);
// Creates a mjrfMesh for the given skin object.
UniquePtr<mjrfMesh> CreateSkinMesh(mjrfContext* ctx, const mjModel* model,