Add mjv_connector, identical to mjv_makeConnector but with a more convenient "from-to" parameterization.

PiperOrigin-RevId: 542343761
Change-Id: I75f5ff3c404a2a9f65dfed706e590efd7b951f6e
This commit is contained in:
Yuval Tassa
2023-06-21 13:18:33 -07:00
committed by Copybara-Service
parent 74747e2ae6
commit c50c92ccc8
9 changed files with 142 additions and 105 deletions
+12
View File
@@ -1502,6 +1502,18 @@ mjv_makeConnector
.. mujoco-include:: mjv_makeConnector
Set (type, size, pos, mat) for connector-type geom between given points.
Assume that mjv_initGeom was already called to set all other properties.
Width of mjGEOM_LINE is denominated in pixels.
Deprecated: use mjv_connector.
.. _mjv_connector:
mjv_connector
~~~~~~~~~~~~~
.. mujoco-include:: mjv_connector
Set (type, size, pos, mat) for connector-type geom between given points.
Assume that mjv_initGeom was already called to set all other properties.
Width of mjGEOM_LINE is denominated in pixels.
+10
View File
@@ -2,6 +2,16 @@
Changelog
=========
Upcoming version (not yet released)
-----------------------------------
General
^^^^^^^
- Added :ref:`mjv_connector` which has identical functionality to :ref:`mjv_makeConnector`, but with more convenient
"from-to" argument parametrization. :ref:`mjv_makeConnector` is now deprecated.
Version 2.3.6 (June 20, 2023)
-----------------------------
+2
View File
@@ -2297,6 +2297,8 @@ void mjv_initGeom(mjvGeom* geom, int type, const mjtNum size[3],
void mjv_makeConnector(mjvGeom* geom, int type, mjtNum width,
mjtNum a0, mjtNum a1, mjtNum a2,
mjtNum b0, mjtNum b1, mjtNum b2);
void mjv_connector(mjvGeom* geom, int type, mjtNum width,
const mjtNum from[3], const mjtNum to[3]);
void mjv_defaultScene(mjvScene* scn);
void mjv_makeScene(const mjModel* m, mjvScene* scn, int maxgeom);
void mjv_freeScene(mjvScene* scn);