Deprecate mju_rotVecMat and mju_rotVecMatT in favor of mju_mulMatVec3 and mju_mulMatTVec3.

These functions names and argument ordering are more consistent with the rest of the API.

PiperOrigin-RevId: 643788290
Change-Id: I783eda8021b80b82098e23ed95669b102bb82508
This commit is contained in:
Yuval Tassa
2024-06-16 10:01:31 -07:00
committed by Copybara-Service
parent 739512a0e4
commit 6067048537
33 changed files with 233 additions and 117 deletions
+60 -2
View File
@@ -6130,6 +6130,64 @@ FUNCTIONS: Mapping[str, FunctionDecl] = dict([
),
doc='Return Cartesian distance between 3D vectors pos1 and pos2.',
)),
('mju_mulMatVec3',
FunctionDecl(
name='mju_mulMatVec3',
return_type=ValueType(name='void'),
parameters=(
FunctionParameterDecl(
name='res',
type=ArrayType(
inner_type=ValueType(name='mjtNum'),
extents=(3,),
),
),
FunctionParameterDecl(
name='mat',
type=ArrayType(
inner_type=ValueType(name='mjtNum', is_const=True),
extents=(9,),
),
),
FunctionParameterDecl(
name='vec',
type=ArrayType(
inner_type=ValueType(name='mjtNum', is_const=True),
extents=(3,),
),
),
),
doc='Multiply 3-by-3 matrix by vector: res = mat * vec.',
)),
('mju_mulMatTVec3',
FunctionDecl(
name='mju_mulMatTVec3',
return_type=ValueType(name='void'),
parameters=(
FunctionParameterDecl(
name='res',
type=ArrayType(
inner_type=ValueType(name='mjtNum'),
extents=(3,),
),
),
FunctionParameterDecl(
name='mat',
type=ArrayType(
inner_type=ValueType(name='mjtNum', is_const=True),
extents=(9,),
),
),
FunctionParameterDecl(
name='vec',
type=ArrayType(
inner_type=ValueType(name='mjtNum', is_const=True),
extents=(3,),
),
),
),
doc="Multiply transposed 3-by-3 matrix by vector: res = mat' * vec.",
)),
('mju_rotVecMat',
FunctionDecl(
name='mju_rotVecMat',
@@ -6157,7 +6215,7 @@ FUNCTIONS: Mapping[str, FunctionDecl] = dict([
),
),
),
doc='Multiply vector by 3D rotation matrix: res = mat * vec.',
doc='Deprecated, use mju_mulMatVec3(res, mat, vec).',
)),
('mju_rotVecMatT',
FunctionDecl(
@@ -6186,7 +6244,7 @@ FUNCTIONS: Mapping[str, FunctionDecl] = dict([
),
),
),
doc="Multiply vector by transposed 3D rotation matrix: res = mat' * vec.", # pylint: disable=line-too-long
doc='Deprecated, use mju_mulMatTVec3(res, mat, vec).',
)),
('mju_cross',
FunctionDecl(