Matrix3.d.ts 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. import { Matrix4 } from './Matrix4';
  2. import { BufferAttribute } from './../core/BufferAttribute';
  3. import { Vector3 } from './Vector3';
  4. /**
  5. * ( interface Matrix<T> )
  6. */
  7. export interface Matrix {
  8. /**
  9. * Float32Array with matrix values.
  10. */
  11. elements: Float32Array;
  12. /**
  13. * identity():T;
  14. */
  15. identity(): Matrix;
  16. /**
  17. * copy(m:T):T;
  18. */
  19. copy(m: this): this;
  20. /**
  21. * multiplyScalar(s:number):T;
  22. */
  23. multiplyScalar(s: number): Matrix;
  24. determinant(): number;
  25. /**
  26. * getInverse(matrix:T, throwOnInvertible?:boolean):T;
  27. */
  28. getInverse(matrix: Matrix, throwOnInvertible?: boolean): Matrix;
  29. /**
  30. * transpose():T;
  31. */
  32. transpose(): Matrix;
  33. /**
  34. * clone():T;
  35. */
  36. clone(): this;
  37. }
  38. /**
  39. * ( class Matrix3 implements Matrix<Matrix3> )
  40. */
  41. export class Matrix3 implements Matrix {
  42. /**
  43. * Creates an identity matrix.
  44. */
  45. constructor();
  46. /**
  47. * Float32Array with matrix values.
  48. */
  49. elements: Float32Array;
  50. set(
  51. n11: number,
  52. n12: number,
  53. n13: number,
  54. n21: number,
  55. n22: number,
  56. n23: number,
  57. n31: number,
  58. n32: number,
  59. n33: number
  60. ): Matrix3;
  61. identity(): Matrix3;
  62. clone(): this;
  63. copy(m: Matrix3): this;
  64. setFromMatrix4(m: Matrix4): Matrix3;
  65. /**
  66. * @deprecated Use {@link Matrix3#applyToBufferAttribute matrix3.applyToBufferAttribute( attribute )} instead.
  67. */
  68. applyToBuffer(
  69. buffer: BufferAttribute,
  70. offset?: number,
  71. length?: number
  72. ): BufferAttribute;
  73. applyToBufferAttribute(attribute: BufferAttribute): BufferAttribute;
  74. multiplyScalar(s: number): Matrix3;
  75. determinant(): number;
  76. getInverse(matrix: Matrix3, throwOnDegenerate?: boolean): Matrix3;
  77. /**
  78. * Transposes this matrix in place.
  79. */
  80. transpose(): Matrix3;
  81. getNormalMatrix(matrix4: Matrix4): Matrix3;
  82. /**
  83. * Transposes this matrix into the supplied array r, and returns itself.
  84. */
  85. transposeIntoArray(r: number[]): number[];
  86. fromArray(array: number[], offset?: number): Matrix3;
  87. toArray(): number[];
  88. /**
  89. * Multiplies this matrix by m.
  90. */
  91. multiply(m: Matrix3): Matrix3;
  92. premultiply(m: Matrix3): Matrix3;
  93. /**
  94. * Sets this matrix to a x b.
  95. */
  96. multiplyMatrices(a: Matrix3, b: Matrix3): Matrix3;
  97. /**
  98. * @deprecated Use {@link Vector3.applyMatrix3 vector.applyMatrix3( matrix )} instead.
  99. */
  100. multiplyVector3(vector: Vector3): any;
  101. /**
  102. * @deprecated This method has been removed completely.
  103. */
  104. multiplyVector3Array(a: any): any;
  105. getInverse(matrix: Matrix4, throwOnDegenerate?: boolean): Matrix3;
  106. /**
  107. * @deprecated Use {@link Matrix3#toArray .toArray()} instead.
  108. */
  109. flattenToArrayOffset(array: number[], offset: number): number[];
  110. }
粤ICP备19079148号