Add built-in supertoroid mesh.

PiperOrigin-RevId: 791180080
Change-Id: I3a70f50ff4a52a1bd4b88fc30334a574895145b4
This commit is contained in:
Yuval Tassa
2025-08-05 06:05:44 -07:00
committed by Copybara-Service
parent e543ba95c5
commit a5d4d1000e
13 changed files with 189 additions and 41 deletions
+8 -4
View File
@@ -1348,11 +1348,15 @@ The full list of processing steps applied by the compiler to each mesh is as fol
**nvert**: integer >= 3: The number vertices in the polygon.
|br| **radius**: real in [0, 1]: The radius of the top face.
:at-val:`torus` (radius, resolution)
A torus with major radius of 1 and given minor radius.
:at-val:`supertorus` (resolution, radius, s, t)
A generalization of a torus with major radius of 1 and given minor radius. If the **s** and **t** parameters are
both 1, the shape is a torus. See `here <https://en.wikipedia.org/wiki/Supertoroid>`__ for details regarding
the definition of supertori.
**radius**: real in (0, 1]: The minor radius of the torus.
|br| **resolution** integer >= 4: The discretization of both major and minor radii.
**resolution** integer >= 4: The discretization of both major and minor radii.
|br| **radius**: real in (0, 1]: The minor radius of the torus.
|br| **s**: real > 0: The "squareness" of major sections.
|br| **t**: real > 0: The "squareness" of minor sections.
:at-val:`wedge` (res_phi, res_theta, fov_phi, fov_theta, gamma)
A slice of a unit spherical shell in spherical coordinates.
+1 -1
View File
@@ -1789,7 +1789,7 @@ typedef enum mjtMeshBuiltin_ { // type of built-in procedural mesh
mjMESH_BUILTIN_SPHERE, // sphere
mjMESH_BUILTIN_HEMISPHERE, // hemisphere
mjMESH_BUILTIN_CONE, // cone
mjMESH_BUILTIN_TORUS, // torus
mjMESH_BUILTIN_SUPERTORUS, // supertorus
mjMESH_BUILTIN_WEDGE, // wedge
mjMESH_BUILTIN_PLATE, // plate
} mjtMeshBuiltin;