W3C home > Mailing lists > Public > public-device-apis-log@w3.org > February 2017

Re: [sensors] Provide the DeviceOrientation sensor

From: Kenneth Rohde Christiansen via GitHub <sysbot+gh@w3.org>
Date: Tue, 28 Feb 2017 18:44:55 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-283111380-1488303715-sysbot+gh@w3.org>

glMatrix is modeled after the needs of WebGL, which in turn uses 
matrix conventions set by OpenGL. Specifically, a 4x4 matrix is an 
array of 16 contiguous floats with the 13th, 14th, and 15th elements 
representing the X, Y, and Z, translation components.

This may lead to some confusion when referencing OpenGL documentation,
 however, which represents out all matricies in column-major format. 
This means that while in code a matrix may be typed out as:

[1, 0, 0, 0,
 0, 1, 0, 0,
 0, 0, 1, 0,
 x, y, z, 0]
The same matrix in the OpenGL documentation is written as:

1 0 0 x
0 1 0 y
0 0 1 z
0 0 0 0
Please rest assured, however, that they are the same thing! This is 
not unique to glMatrix, either, as OpenGL developers have long been 
confused by the apparent lack of consistency between the memory layout
 and the documentation.

Sorry about that, but there's not much I can do about it.

GitHub Notification of comment by kenchris
Please view or discuss this issue at 
https://github.com/w3c/sensors/issues/170#issuecomment-283111380 using
 your GitHub account
Received on Tuesday, 28 February 2017 18:45:01 UTC

This archive was generated by hypermail 2.4.0 : Monday, 4 July 2022 12:47:53 UTC