Matrix3.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. <h1>[name]</h1>
  12. <div class="desc">A 3x3 matrix.</div>
  13. <h2>Constructor</h2>
  14. <h3>[name]()</h3>
  15. <div>
  16. Creates and initializes the 3x3 matrix to the identity matrix.
  17. </div>
  18. <h2>Properties</h2>
  19. <h3>[property:Float32Array elements]</h3>
  20. <div>
  21. A column-major list of matrix values.
  22. </div>
  23. <h2>Methods</h2>
  24. <h3>[method:Matrix3 set]( [page:Float n11], [page:Float n12], [page:Float n13], [page:Float n21], [page:Float n22], [page:Float n23], [page:Float n31], [page:Float n32], [page:Float n33] ) [page:Matrix3 this]</h3>
  25. <div>
  26. n11 -- [page:Float] <br />
  27. n12 -- [page:Float] <br />
  28. n13 -- [page:Float] <br />
  29. n21 -- [page:Float] <br />
  30. n22 -- [page:Float] <br />
  31. n23 -- [page:Float] <br />
  32. n31 -- [page:Float] <br />
  33. n32 -- [page:Float] <br />
  34. n33 -- [page:Float]
  35. </div>
  36. <div>
  37. Sets the 3x3 matrix values to the given row-major sequence of values.
  38. </div>
  39. <h3>[method:Matrix3 copy]( [page:Matrix3 m] ) [page:Matrix3 this]</h3>
  40. <div>
  41. m -- [page:Matrix4]
  42. </div>
  43. <div>
  44. Copies the values of matrix *m* into this matrix.
  45. </div>
  46. <h3>[method:Matrix3 fromArray]( [page:Array array] ) [page:Matrix3 this]</h3>
  47. <div>
  48. array -- [page:Array] The array to read the elements from.
  49. </div>
  50. <div>
  51. Sets the elements of this matrix based on an array in column-major format.
  52. </div>
  53. <h3>[method:Matrix3 transpose]() [page:Matrix3 this]</h3>
  54. <div>
  55. Transposes this matrix in place.
  56. </div>
  57. <h3>[method:Matrix3 transposeIntoArray]( [page:Array array] ) [page:Matrix3 this]</h3>
  58. <div>
  59. array -- [page:Array] <br />
  60. </div>
  61. <div>
  62. Transposes this matrix into the supplied array, and returns itself unchanged.
  63. </div>
  64. <h3>[method:Float determinant]() [page:Matrix3 this]</h3>
  65. <div>
  66. Computes and returns the determinant of this matrix.
  67. </div>
  68. <h3>[method:Matrix3 multiplyScalar]( [page:Float s] ) [page:Matrix3 this]</h3>
  69. <div>
  70. scalar -- [page:Float]
  71. </div>
  72. <div>
  73. Multiplies every component of the matrix by the scalar value *s*.
  74. </div>
  75. <h3>[method:Array applyToVector3Array]( [page:Array array] ) [page:Matrix3 this]</h3>
  76. <div>
  77. array -- An array in the form [vector1x, vector1y, vector1z, vector2x, vector2y, vector2z, ...]
  78. </div>
  79. <div>
  80. Multiplies (applies) this matrix to every vector3 in the array.
  81. </div>
  82. <h3>[method:Matrix3 getNormalMatrix]( [page:Matrix4 m] ) [page:Matrix3 this]</h3>
  83. <div>
  84. m -- [page:Matrix4]
  85. </div>
  86. <div>
  87. Sets this matrix as the normal matrix (upper left 3x3)of the passed [page:Matrix4 matrix4]. The normal matrix is the inverse transpose of the matrix *m*.
  88. </div>
  89. <h3>[method:Matrix3 getInverse]( [page:Matrix4 m], [page:Boolean throwOnDegenerate] ) [page:Matrix3 this]</h3>
  90. <div>
  91. m -- [page:Matrix4]<br />
  92. throwOnDegenerate -- [Page:Boolean] If true, throw an error if the matrix is degenerate (not invertible).
  93. </div>
  94. <div>
  95. Set this matrix to the inverse of the passed matrix.
  96. </div>
  97. <h3>[method:Matrix3 identity]() [page:Matrix3 this]</h3>
  98. <div>
  99. Resets this matrix to identity.<br/><br/>
  100. 1, 0, 0<br/>
  101. 0, 1, 0<br/>
  102. 0, 0, 1<br/>
  103. </div>
  104. <h3>[method:Matrix3 clone]() [page:Matrix3 this]</h3>
  105. <div>
  106. Creates a copy of this matrix.
  107. </div>
  108. <h3>[method:Array toArray]( [page:Array array], [page:Integer offset] ) [page:Matrix3 this]</h3>
  109. <div>
  110. array -- [page:Array] optional array to store the vector <br />
  111. offset -- [page:Integer] optional offset into the array
  112. </div>
  113. <div>
  114. Writes the elements of this matrix to an array in column-major format.
  115. </div>
  116. <h2>Source</h2>
  117. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  118. </body>
  119. </html>