mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-28 18:46:18 +00:00
h/mercury: Use much faster quaternion change of basis
This commit is contained in:
parent
173d55c58b
commit
81764273ca
|
@ -564,7 +564,8 @@ CostFunctor<optimize_hand_size>::operator()(const T *const x, T *residual) const
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
// look at tests_quat_change_of_basis
|
||||
#if 0
|
||||
template <typename T>
|
||||
static inline void
|
||||
zldtt_ori_right(Quat<T> &orientation, xrt_quat *out)
|
||||
|
@ -591,6 +592,17 @@ zldtt_ori_right(Quat<T> &orientation, xrt_quat *out)
|
|||
|
||||
math_quat_from_plus_x_z(&x, &z, out);
|
||||
}
|
||||
#else
|
||||
template <typename T>
|
||||
static inline void
|
||||
zldtt_ori_right(Quat<T> &orientation, xrt_quat *out)
|
||||
{
|
||||
out->x = -orientation.x;
|
||||
out->y = orientation.y;
|
||||
out->z = orientation.z;
|
||||
out->w = -orientation.w;
|
||||
}
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
static inline void
|
||||
|
|
Loading…
Reference in a new issue