Matrix3.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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:Integer offset] ) [page:Matrix3 this]</h3>
  47. <div>
  48. array -- [page:Array] The array to read the elements from.<br />
  49. offset -- [page:Integer] optional offset into the array. Default is 0.
  50. </div>
  51. <div>
  52. Sets the elements of this matrix based on an array in column-major format.
  53. </div>
  54. <h3>[method:Matrix3 transpose]() [page:Matrix3 this]</h3>
  55. <div>
  56. Transposes this matrix in place.
  57. </div>
  58. <h3>[method:Matrix3 transposeIntoArray]( [page:Array array] ) [page:Matrix3 this]</h3>
  59. <div>
  60. array -- [page:Array] <br />
  61. </div>
  62. <div>
  63. Transposes this matrix into the supplied array, and returns itself unchanged.
  64. </div>
  65. <h3>[method:Float determinant]() [page:Matrix3 this]</h3>
  66. <div>
  67. Computes and returns the determinant of this matrix.
  68. </div>
  69. <h3>[method:Matrix3 multiplyScalar]( [page:Float s] ) [page:Matrix3 this]</h3>
  70. <div>
  71. scalar -- [page:Float]
  72. </div>
  73. <div>
  74. Multiplies every component of the matrix by the scalar value *s*.
  75. </div>
  76. <h3>[method:Array applyToVector3Array]( [page:Array array] ) [page:Matrix3 this]</h3>
  77. <div>
  78. array -- An array in the form [vector1x, vector1y, vector1z, vector2x, vector2y, vector2z, ...]
  79. </div>
  80. <div>
  81. Multiplies (applies) this matrix to every vector3 in the array.
  82. </div>
  83. <h3>[method:Matrix3 getNormalMatrix]( [page:Matrix4 m] ) [page:Matrix3 this]</h3>
  84. <div>
  85. m -- [page:Matrix4]
  86. </div>
  87. <div>
  88. 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*.
  89. </div>
  90. <h3>[method:Matrix3 getInverse]( [page:Matrix4 m], [page:Boolean throwOnDegenerate] ) [page:Matrix3 this]</h3>
  91. <div>
  92. m -- [page:Matrix4]<br />
  93. throwOnDegenerate -- [Page:Boolean] If true, throw an error if the matrix is degenerate (not invertible).
  94. </div>
  95. <div>
  96. Set this matrix to the inverse of the passed matrix.
  97. </div>
  98. <h3>[method:Matrix3 identity]() [page:Matrix3 this]</h3>
  99. <div>
  100. Resets this matrix to identity.<br/><br/>
  101. 1, 0, 0<br/>
  102. 0, 1, 0<br/>
  103. 0, 0, 1<br/>
  104. </div>
  105. <h3>[method:Matrix3 clone]() [page:Matrix3 this]</h3>
  106. <div>
  107. Creates a copy of this matrix.
  108. </div>
  109. <h3>[method:Array toArray]( [page:Array array], [page:Integer offset] ) [page:Matrix3 this]</h3>
  110. <div>
  111. array -- [page:Array] optional array to store the vector <br />
  112. offset -- [page:Integer] optional offset into the array
  113. </div>
  114. <div>
  115. Writes the elements of this matrix to an array in column-major format.
  116. </div>
  117. <h2>Source</h2>
  118. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  119. </body>
  120. </html>