提交 ad00e354 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #10459 from looeee/docs/matrix4/error_fix

Fixed error in Matrix4 doc
......@@ -39,7 +39,7 @@ m.elements = [ 11, 21, 31,
and internally all calculations are performed using column-major ordering. However, as the actual ordering
makes no difference mathematically and most people are used to thinking about matrices in row-major order,
the three.js documentation shows matrices in row-major order. Just bear in mind that if you are reading the source
code, you'll have to take the transpose of any matrices outlined here to make sense of the calculations.
code, you'll have to take the [link:https://en.wikipedia.org/wiki/Transpose transpose] of any matrices outlined here to make sense of the calculations.
</div>
<h2>Constructor</h2>
......
......@@ -40,7 +40,7 @@
[page:Camera Cameras] have two additional matrix4s:
<ul>
<li>
[page:Object3D.matrixWorldInverse]: The inverse of the [page:Object3D.matrixWorld] descibed above.
[page:Object3D.matrixWorldInverse]: The inverse of the [page:Object3D.matrixWorld] described above.
</li>
<li>
[page:Object3D.projectionMatrix]:
......@@ -48,13 +48,6 @@
</ul>
</div>
<h2>Example</h2>
<code>
var m = new Matrix4();
</code>
<h2>A Note on Row-Major and Column-Major Ordering</h2>
<div>
The [page:set]() method takes arguments in [link:https://en.wikipedia.org/wiki/Row-_and_column-major_order#Column-major_order row-major]
......@@ -62,21 +55,25 @@ var m = new Matrix4();
This means that calling
<code>
var m = new Matrix4();
m.set( 11, 12, 13, 14,
21, 22, 23, 24,
31, 32, 33, 34 );
31, 32, 33, 34,
41, 42, 43, 44 );
</code>
will result in the [page:.elements elements] array containing:
<code>
m.elements = [ 11, 21, 31, 41,
12, 22, 32, 42,
13, 23, 33, 43 ];
13, 23, 33, 43,
14, 24, 34, 44 ];
</code>
and internally all calculations are performed using column-major ordering. However, as the actual ordering
makes no difference mathematically and most people are used to thinking about matrices in row-major order,
the three.js documentation shows matrices in row-major order. Just bear in mind that if you are reading the source
code, you'll have to take the transpose of any matrices outlined here to make sense of the calculations.
code, you'll have to take the [link: https://en.wikipedia.org/wiki/Transpose transpose] of any matrices outlined here to make sense of the calculations.
</div>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册