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
+36
View File
@@ -3871,6 +3871,42 @@ FUNCTIONS: Mapping[str, FunctionDecl] = dict([
type=ValueType(name='mjtNum'),
),
),
doc='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.', # pylint: disable=line-too-long
)),
('mjv_connector',
FunctionDecl(
name='mjv_connector',
return_type=ValueType(name='void'),
parameters=(
FunctionParameterDecl(
name='geom',
type=PointerType(
inner_type=ValueType(name='mjvGeom'),
),
),
FunctionParameterDecl(
name='type',
type=ValueType(name='int'),
),
FunctionParameterDecl(
name='width',
type=ValueType(name='mjtNum'),
),
FunctionParameterDecl(
name='from',
type=ArrayType(
inner_type=ValueType(name='mjtNum', is_const=True),
extents=(3,),
),
),
FunctionParameterDecl(
name='to',
type=ArrayType(
inner_type=ValueType(name='mjtNum', is_const=True),
extents=(3,),
),
),
),
doc='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.', # pylint: disable=line-too-long
)),
('mjv_defaultScene',