KhronosGroup / glTF

glTF – Runtime 3D Asset Delivery
Other
7.16k stars 1.14k forks source link

Coordinate system clarification #566

Closed jbherdman closed 7 years ago

jbherdman commented 8 years ago

In the spec, under the "Coordinate System and Units" section:

glTF uses a right-handed coordinate system, that is, the cross product of x and y yields z.

The cross product of (1,0,0) and (0,1,0) always yields (0,0,1), by mathematical construction. The distinguishing feature is that glTF uses the "right hand rule" to orient the positive-Z axis relative to the XY plane.

There must be a more concise way to state this, but with a "flat" right hand, fingers extended, if you point your fingers towards the positive-X and point your palm towards the positive-Y, then your thumb points towards the positive-Z. A "left-handed" coordinate system follows essentially the same rule, except it uses the "left hand" instead of the "right hand".

The spec could probably be improved by changing the quoted sentence to:

glTF uses a right-handed coordinate system, as is used by OpenGL.

Reference: https://www.evl.uic.edu/ralph/508S98/coordinates.html

It is probably also worth explicitly noting whether positive rotation is clockwise or counterclockwise to the axis of rotation.

pjcozzi commented 8 years ago

I agree and labeled this 1.0.1 for the next minor spec update.

pjcozzi commented 8 years ago

Updated with e9783055eed5ee0cede8aec8174ee37b01038876 in 1.0.1 branch.

pjcozzi commented 7 years ago

Updated in #826