Improve builtin hemisphere docs
PiperOrigin-RevId: 791271829 Change-Id: I391215b5388f4e9e2a17198dbcdbd0c605fda4b4
This commit is contained in:
committed by
Copybara-Service
parent
fde479736e
commit
784c7a419b
@@ -1025,13 +1025,13 @@ PYBIND11_MODULE(_specs, m) {
|
||||
py::arg("subdivision"));
|
||||
mjsMesh.def(
|
||||
"make_hemisphere",
|
||||
[](raw::MjsMesh* self, int subdivision) {
|
||||
double params[1] = {static_cast<double>(subdivision)};
|
||||
[](raw::MjsMesh* self, int resolution) {
|
||||
double params[1] = {static_cast<double>(resolution)};
|
||||
if (mjs_makeMesh(self, mjMESH_BUILTIN_HEMISPHERE, params, 1)) {
|
||||
throw pybind11::value_error(mjs_getError(mjs_getSpec(self->element)));
|
||||
}
|
||||
},
|
||||
py::arg("subdivision"));
|
||||
py::arg("resolution"));
|
||||
mjsMesh.def(
|
||||
"make_cone",
|
||||
[](raw::MjsMesh* self, int nedge, double radius) {
|
||||
|
||||
@@ -497,7 +497,7 @@ class SpecsTest(absltest.TestCase):
|
||||
mesh.make_cone(nedge=6, radius=0)
|
||||
|
||||
mesh = spec.add_mesh(name='hemisphere')
|
||||
mesh.make_hemisphere(subdivision=4)
|
||||
mesh.make_hemisphere(resolution=4)
|
||||
|
||||
mesh = spec.add_mesh(name='sphere')
|
||||
mesh.make_sphere(subdivision=2)
|
||||
|
||||
Reference in New Issue
Block a user