Stricter swapping condition in mju_eig3.
This solves the texture rendering issue with the Rubik's cube. The texture were specified with respect to the incorrect frame, so a default rotation of (0, 0, pi/2) is now applied to the model file. PiperOrigin-RevId: 571715153 Change-Id: I3efae3b1fc8f64e6c9e4db90a7609506e3cbed86
This commit is contained in:
committed by
Copybara-Service
parent
77d0400733
commit
f0608648cb
@@ -781,7 +781,8 @@ int mju_eig3(mjtNum eigval[3], mjtNum eigvec[9], mjtNum quat[4], const mjtNum ma
|
||||
for (int j=0; j < 3; j++) {
|
||||
int j1 = j%2; // lead index
|
||||
|
||||
if (eigval[j1] < eigval[j1+1]) {
|
||||
// only swap if the eigenvalues are different
|
||||
if (eigval[j1]+eigEPS < eigval[j1+1]) {
|
||||
// swap eigenvalues
|
||||
t = eigval[j1];
|
||||
eigval[j1] = eigval[j1+1];
|
||||
|
||||
Reference in New Issue
Block a user