Skip to content

Commit 1bb6391

Browse files
ChuangTseucopybara-github
authored andcommitted
Replace SetRotateInto with pxr::GfRotation(from, to) constructor directly
Also remove duplicate line with no effect PiperOrigin-RevId: 781540954 Change-Id: I1e161c2ed0b6e3209697c9551ad30e3371e44865
1 parent d81ab17 commit 1bb6391

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/experimental/usd/plugins/mjcf/mujoco_to_usd.cc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1733,11 +1733,8 @@ class ModelWriter {
17331733

17341734
// Local joint frame for body1
17351735
pxr::GfVec3f local_pos1(mj_jnt_pos);
1736-
pxr::GfRotation().SetRotateInto(pxr::GfVec3f::ZAxis(), mj_jnt_axis);
17371736
pxr::GfQuatf local_rot1(
1738-
pxr::GfRotation()
1739-
.SetRotateInto(pxr::GfVec3f::ZAxis(), mj_jnt_axis)
1740-
.GetQuat());
1737+
pxr::GfRotation(pxr::GfVec3f::ZAxis(), mj_jnt_axis).GetQuat());
17411738

17421739
SetAttributeDefault(
17431740
data_,
@@ -1783,8 +1780,7 @@ class ModelWriter {
17831780
if (joint_prim_type == pxr::UsdPhysicsTokens->PhysicsRevoluteJoint ||
17841781
joint_prim_type == pxr::UsdPhysicsTokens->PhysicsPrismaticJoint) {
17851782
pxr::GfQuatf other_rot0(
1786-
pxr::GfRotation()
1787-
.SetRotateInto(pxr::GfVec3f::ZAxis(), jnt_axis_parent_local)
1783+
pxr::GfRotation(pxr::GfVec3f::ZAxis(), jnt_axis_parent_local)
17881784
.GetQuat());
17891785

17901786
SetAttributeDefault(

0 commit comments

Comments
 (0)