Bug 1635363 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

We might have a potential bug in Matrix4x4::Decompose(). We refer the formula from [1], but when I was trying to 

```
transformMatrix.RotateX(1.2f);
transformMatrix.Decompose(position, orientation, scale);
```
The orientation is [-0.564642, 0.000000, 0.000000, 0.825336]. IIRC, the orientation[0] should be positive because we rotate degrees on +x.

I also notice Chromium is using the same formula when trying to get VRPose and Matrix.Decompose() [2], that makes they have to do this orientation invert [3] as well.

[1] http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm
[2] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/platform/transforms/transformation_matrix.cc;l=567;bpv=1;bpt=1?originalUrl=https:%2F%2Fcs.chromium.org%2F
[3] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/modules/xr/xr_rigid_transform.cc;l=37;bpv=0;bpt=1?originalUrl=https:%2F%2Fcs.chromium.org%2F
We might have a potential bug in Matrix4x4::Decompose(). We refer the formula from [1], but when I was trying to 

```
transformMatrix.RotateX(1.2f);
transformMatrix.Decompose(position, orientation, scale);
```
The orientation is [-0.564642, 0.000000, 0.000000, 0.825336]. IIRC, the orientation[0] should be positive because we rotate degrees on +x.

I also notice Chromium is using the same formula when trying to get a XRPose from Matrix.Decompose() [2], that makes they have to do this orientation invert [3] as well.

[1] http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm
[2] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/platform/transforms/transformation_matrix.cc;l=567;bpv=1;bpt=1?originalUrl=https:%2F%2Fcs.chromium.org%2F
[3] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/modules/xr/xr_rigid_transform.cc;l=37;bpv=0;bpt=1?originalUrl=https:%2F%2Fcs.chromium.org%2F
We might have a potential bug in Matrix4x4::Decompose(). We refer the formula from [1], but when I was trying to 

```
transformMatrix.RotateX(1.2f);
transformMatrix.Decompose(position, orientation, scale);
```
The orientation is [-0.564642, 0.000000, 0.000000, 0.825336]. IIRC, the orientation[0] should be positive because we rotate degrees on +x.

I also notice Chromium is using the same formula of Matrix.Decompose() [2] when trying to get a XRPose, that makes they have to do this orientation invert [3] as well.

[1] http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm
[2] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/platform/transforms/transformation_matrix.cc;l=567;bpv=1;bpt=1?originalUrl=https:%2F%2Fcs.chromium.org%2F
[3] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/modules/xr/xr_rigid_transform.cc;l=37;bpv=0;bpt=1?originalUrl=https:%2F%2Fcs.chromium.org%2F
We might have a potential bug in Matrix4x4::Decompose(). We refer the formula from [1], but when I was trying to 

```
transformMatrix.RotateX(1.2f);
transformMatrix.Decompose(position, orientation, scale);
```
The orientation is [-0.564642, 0.000000, 0.000000, 0.825336]. IIRC, the orientation[0] should be positive because we rotate degrees on +x.

I also notice Chromium is using the same formula of Matrix.Decompose() [2] when getting a XRPose, that makes they have to do this orientation invert [3] as well.

[1] http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm
[2] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/platform/transforms/transformation_matrix.cc;l=567;bpv=1;bpt=1?originalUrl=https:%2F%2Fcs.chromium.org%2F
[3] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/modules/xr/xr_rigid_transform.cc;l=37;bpv=0;bpt=1?originalUrl=https:%2F%2Fcs.chromium.org%2F
We might have a potential bug in Matrix4x4::Decompose(). We refer the formula from [1], but when I was trying to 

```
transformMatrix.RotateX(1.2f);
transformMatrix.Decompose(position, orientation, scale);
```
The orientation is [-0.564642, 0.000000, 0.000000, 0.825336]. IIRC, the orientation.x should be positive because we rotate degrees on +x.

I also notice Chromium is using the same formula of Matrix.Decompose() [2] when getting a XRPose, that makes they have to do this orientation invert [3] as well.

[1] http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm
[2] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/platform/transforms/transformation_matrix.cc;l=567;bpv=1;bpt=1?originalUrl=https:%2F%2Fcs.chromium.org%2F
[3] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/modules/xr/xr_rigid_transform.cc;l=37;bpv=0;bpt=1?originalUrl=https:%2F%2Fcs.chromium.org%2F
We might have a potential bug in Matrix4x4::Decompose(). We refer the formula from [1], but when I was trying to 

```
transformMatrix.RotateX(1.2f);
transformMatrix.Decompose(position, orientation, scale);
```
The orientation here is [-0.564642, 0.000000, 0.000000, 0.825336]. IIRC, the orientation.x should be positive because we rotate degrees on +x.

I also notice Chromium is using the same formula of Matrix.Decompose() [2] when getting a XRPose, that makes they have to do this orientation invert [3] as well.

[1] http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm
[2] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/platform/transforms/transformation_matrix.cc;l=567;bpv=1;bpt=1?originalUrl=https:%2F%2Fcs.chromium.org%2F
[3] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/modules/xr/xr_rigid_transform.cc;l=37;bpv=0;bpt=1?originalUrl=https:%2F%2Fcs.chromium.org%2F
We might have a potential bug in Matrix4x4::Decompose(). We refer the formula from [1], but when I was trying to 

```
transformMatrix.RotateX(1.2f);
transformMatrix.Decompose(position, orientation, scale);
```
The orientation here is [-0.564642, 0.000000, 0.000000, 0.825336]. IIUC, the orientation.x should be positive because we rotate degrees on +x.

I also notice Chromium is using the same formula of Matrix.Decompose() [2] when getting a XRPose, that makes they have to do this orientation invert [3] as well.

[1] http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm
[2] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/platform/transforms/transformation_matrix.cc;l=567;bpv=1;bpt=1?originalUrl=https:%2F%2Fcs.chromium.org%2F
[3] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/modules/xr/xr_rigid_transform.cc;l=37;bpv=0;bpt=1?originalUrl=https:%2F%2Fcs.chromium.org%2F
We might have a potential bug in Matrix4x4::Decompose(). We refer the formula from [1], but when I was trying to 

```
transformMatrix.RotateX(1.2f);
transformMatrix.Decompose(position, orientation, scale);
```
The orientation here is [-0.564642, 0.000000, 0.000000, 0.825336]. IIUC, the orientation.x should be positive because we rotate on +x.

I also notice Chromium is using the same formula of Matrix.Decompose() [2] when getting a XRPose, that makes they have to do this orientation invert [3] as well.

[1] http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm
[2] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/platform/transforms/transformation_matrix.cc;l=567;bpv=1;bpt=1?originalUrl=https:%2F%2Fcs.chromium.org%2F
[3] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/modules/xr/xr_rigid_transform.cc;l=37;bpv=0;bpt=1?originalUrl=https:%2F%2Fcs.chromium.org%2F

Back to Bug 1635363 Comment 0