tangled
alpha
login
or
join now
matrixfurry.com
/
monado
0
fork
atom
The open source OpenXR runtime
0
fork
atom
overview
issues
pulls
pipelines
testing
matrixfurry.com
3 months ago
0a31ce45
822e93d6
verified
This commit was signed with the committer's
known signature
.
matrixfurry.com
SSH Key Fingerprint:
SHA256:68a4335QUqf4PR8E4jmNMaKH1SIxm7r+LLY9m/8nc/s=
+3
-10
1 changed file
expand all
collapse all
unified
split
src
xrt
drivers
steamvr_lh
device.cpp
+3
-10
src/xrt/drivers/steamvr_lh/device.cpp
···
1061
1061
relation.linear_velocity = copy_vec3(newPose.vecVelocity);
1062
1062
relation.angular_velocity = copy_vec3(newPose.vecAngularVelocity);
1063
1063
1064
1064
-
// local transform (head to driver offset)
1064
1064
+
math_quat_rotate_vec3(&relation.pose.orientation, &relation.angular_velocity, &relation.angular_velocity);
1065
1065
+
1066
1066
+
// apply over local transform
1065
1067
const xrt_pose local = copy_pose(newPose.qDriverFromHeadRotation, newPose.vecDriverFromHeadTranslation);
1066
1066
-
1067
1067
-
// IMU linear velocity contribution due to rotation around driver origin (tangential velocity)
1068
1068
-
xrt_vec3 tangential_velocity;
1069
1069
-
math_vec3_cross(&relation.angular_velocity, &local.position, &tangential_velocity);
1070
1070
-
math_quat_rotate_vec3(&relation.pose.orientation, &tangential_velocity, &tangential_velocity);
1071
1071
-
math_vec3_accum(&tangential_velocity, &relation.linear_velocity);
1072
1072
-
1073
1073
-
// apply local transform
1074
1074
-
math_quat_rotate_vec3(&relation.pose.orientation, &relation.angular_velocity, &relation.angular_velocity);
1075
1068
math_pose_transform(&relation.pose, &local, &relation.pose);
1076
1069
1077
1070
// apply world transform