rhodonite 0.19.10 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -2
- package/VERSION-FILE +1 -1
- package/dist/esm/foundation/components/Skeletal/SkeletalComponent.d.ts +138 -45
- package/dist/esm/foundation/core/Component.d.ts +63 -3
- package/dist/esm/foundation/core/ComponentMemoryRegistry.d.ts +59 -1
- package/dist/esm/foundation/core/Config.d.ts +8 -7
- package/dist/esm/foundation/definitions/BoneDataType.d.ts +12 -1
- package/dist/esm/foundation/importer/BoneDataTypeDetector.d.ts +31 -0
- package/dist/esm/foundation/importer/index.d.ts +1 -0
- package/dist/esm/foundation/math/AbstractMatrix.d.ts +3 -2
- package/dist/esm/foundation/math/AbstractQuaternion.d.ts +2 -1
- package/dist/esm/foundation/math/IMatrix.d.ts +2 -2
- package/dist/esm/foundation/math/IQuaternion.d.ts +4 -4
- package/dist/esm/foundation/math/LogQuaternion.d.ts +110 -38
- package/dist/esm/foundation/math/MathUtil.d.ts +55 -0
- package/dist/esm/foundation/math/Matrix22.d.ts +176 -30
- package/dist/esm/foundation/math/Matrix33.d.ts +206 -38
- package/dist/esm/foundation/math/Matrix44.d.ts +222 -39
- package/dist/esm/foundation/math/MutableMatrix22.d.ts +125 -130
- package/dist/esm/foundation/math/MutableMatrix33.d.ts +148 -162
- package/dist/esm/foundation/math/MutableMatrix44.d.ts +159 -183
- package/dist/esm/foundation/math/MutableQuaternion.d.ts +241 -132
- package/dist/esm/foundation/math/MutableScalar.d.ts +11 -12
- package/dist/esm/foundation/math/MutableVector2.d.ts +30 -31
- package/dist/esm/foundation/math/MutableVector3.d.ts +28 -26
- package/dist/esm/foundation/math/MutableVector4.d.ts +37 -37
- package/dist/esm/foundation/math/Quaternion.d.ts +529 -36
- package/dist/esm/foundation/math/Scalar.d.ts +13 -14
- package/dist/esm/foundation/math/Vector2.d.ts +38 -38
- package/dist/esm/foundation/math/Vector3.d.ts +55 -54
- package/dist/esm/foundation/math/Vector4.d.ts +54 -55
- package/dist/esm/index.js +691 -686
- package/dist/esm/types/glTF2.d.ts +7 -0
- package/dist/esmdev/foundation/components/Skeletal/SkeletalComponent.d.ts +138 -45
- package/dist/esmdev/foundation/core/Component.d.ts +63 -3
- package/dist/esmdev/foundation/core/ComponentMemoryRegistry.d.ts +59 -1
- package/dist/esmdev/foundation/core/Config.d.ts +8 -7
- package/dist/esmdev/foundation/definitions/BoneDataType.d.ts +12 -1
- package/dist/esmdev/foundation/importer/BoneDataTypeDetector.d.ts +31 -0
- package/dist/esmdev/foundation/importer/index.d.ts +1 -0
- package/dist/esmdev/foundation/math/AbstractMatrix.d.ts +3 -2
- package/dist/esmdev/foundation/math/AbstractQuaternion.d.ts +2 -1
- package/dist/esmdev/foundation/math/IMatrix.d.ts +2 -2
- package/dist/esmdev/foundation/math/IQuaternion.d.ts +4 -4
- package/dist/esmdev/foundation/math/LogQuaternion.d.ts +110 -38
- package/dist/esmdev/foundation/math/MathUtil.d.ts +55 -0
- package/dist/esmdev/foundation/math/Matrix22.d.ts +176 -30
- package/dist/esmdev/foundation/math/Matrix33.d.ts +206 -38
- package/dist/esmdev/foundation/math/Matrix44.d.ts +222 -39
- package/dist/esmdev/foundation/math/MutableMatrix22.d.ts +125 -130
- package/dist/esmdev/foundation/math/MutableMatrix33.d.ts +148 -162
- package/dist/esmdev/foundation/math/MutableMatrix44.d.ts +159 -183
- package/dist/esmdev/foundation/math/MutableQuaternion.d.ts +241 -132
- package/dist/esmdev/foundation/math/MutableScalar.d.ts +11 -12
- package/dist/esmdev/foundation/math/MutableVector2.d.ts +30 -31
- package/dist/esmdev/foundation/math/MutableVector3.d.ts +28 -26
- package/dist/esmdev/foundation/math/MutableVector4.d.ts +37 -37
- package/dist/esmdev/foundation/math/Quaternion.d.ts +529 -36
- package/dist/esmdev/foundation/math/Scalar.d.ts +13 -14
- package/dist/esmdev/foundation/math/Vector2.d.ts +38 -38
- package/dist/esmdev/foundation/math/Vector3.d.ts +55 -54
- package/dist/esmdev/foundation/math/Vector4.d.ts +54 -55
- package/dist/esmdev/index.js +4994 -2723
- package/dist/esmdev/types/glTF2.d.ts +7 -0
- package/package.json +12 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Array4, Index } from '../../types/CommonTypes';
|
|
1
|
+
import type { Array4, FloatTypedArrayConstructor, Index, TypedArray } from '../../types/CommonTypes';
|
|
2
2
|
import type { IMatrix22, IMatrix33, IMatrix44, IMutableMatrix, IMutableMatrix22 } from './IMatrix';
|
|
3
3
|
import type { IVector2 } from './IVector';
|
|
4
|
-
import {
|
|
4
|
+
import { Matrix22_ } from './Matrix22';
|
|
5
5
|
/**
|
|
6
6
|
* A mutable 2x2 matrix class that extends Matrix22 and provides modification capabilities.
|
|
7
7
|
* This class allows in-place operations for matrix transformations, making it suitable
|
|
@@ -21,7 +21,15 @@ import { Matrix22 } from './Matrix22';
|
|
|
21
21
|
* matrix.scale(Vector2.fromCopyArray([2, 3])); // Scale by 2x and 3y
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
|
-
export declare class
|
|
24
|
+
export declare class MutableMatrix22_<T extends FloatTypedArrayConstructor> extends Matrix22_<T> implements IMutableMatrix, IMutableMatrix22 {
|
|
25
|
+
/**
|
|
26
|
+
* Creates a new MutableMatrix22_ instance.
|
|
27
|
+
* @param m - The typed array containing the matrix components
|
|
28
|
+
* @param options - Configuration object containing the typed array constructor
|
|
29
|
+
*/
|
|
30
|
+
constructor(m: TypedArray, options: {
|
|
31
|
+
type: T;
|
|
32
|
+
});
|
|
25
33
|
/**
|
|
26
34
|
* Sets the value at position (0,0) of the matrix.
|
|
27
35
|
*
|
|
@@ -76,61 +84,6 @@ export declare class MutableMatrix22 extends Matrix22 implements IMutableMatrix,
|
|
|
76
84
|
* @returns The class name "MutableMatrix22"
|
|
77
85
|
*/
|
|
78
86
|
get className(): string;
|
|
79
|
-
/**
|
|
80
|
-
* Creates a new zero matrix where all elements are 0.
|
|
81
|
-
*
|
|
82
|
-
* @returns A new MutableMatrix22 instance with all zero values
|
|
83
|
-
*/
|
|
84
|
-
static zero(): MutableMatrix22;
|
|
85
|
-
/**
|
|
86
|
-
* Creates a new 2x2 identity matrix.
|
|
87
|
-
*
|
|
88
|
-
* @returns A new MutableMatrix22 identity matrix
|
|
89
|
-
*/
|
|
90
|
-
static identity(): MutableMatrix22;
|
|
91
|
-
/**
|
|
92
|
-
* Creates a dummy matrix for placeholder purposes.
|
|
93
|
-
*
|
|
94
|
-
* @returns A new MutableMatrix22 dummy instance
|
|
95
|
-
*/
|
|
96
|
-
static dummy(): MutableMatrix22;
|
|
97
|
-
/**
|
|
98
|
-
* Creates a new matrix that is the transpose of the input matrix.
|
|
99
|
-
*
|
|
100
|
-
* @param mat - The matrix to transpose
|
|
101
|
-
* @returns A new MutableMatrix22 containing the transposed matrix
|
|
102
|
-
*/
|
|
103
|
-
static transpose(mat: IMatrix22): MutableMatrix22;
|
|
104
|
-
/**
|
|
105
|
-
* Creates a new matrix that is the inverse of the input matrix.
|
|
106
|
-
*
|
|
107
|
-
* @param mat - The matrix to invert
|
|
108
|
-
* @returns A new MutableMatrix22 containing the inverted matrix
|
|
109
|
-
* @throws Error if the matrix is not invertible (determinant is 0)
|
|
110
|
-
*/
|
|
111
|
-
static invert(mat: IMatrix22): MutableMatrix22;
|
|
112
|
-
/**
|
|
113
|
-
* Creates a new rotation matrix for the given angle.
|
|
114
|
-
*
|
|
115
|
-
* @param radian - The rotation angle in radians
|
|
116
|
-
* @returns A new MutableMatrix22 representing the rotation transformation
|
|
117
|
-
*/
|
|
118
|
-
static rotate(radian: number): MutableMatrix22;
|
|
119
|
-
/**
|
|
120
|
-
* Creates a new scale matrix from a 2D vector.
|
|
121
|
-
*
|
|
122
|
-
* @param vec - Vector2 containing the scale factors for x and y axes
|
|
123
|
-
* @returns A new MutableMatrix22 representing the scale transformation
|
|
124
|
-
*/
|
|
125
|
-
static scale(vec: IVector2): MutableMatrix22;
|
|
126
|
-
/**
|
|
127
|
-
* Multiplies two matrices and returns a new matrix with the result.
|
|
128
|
-
*
|
|
129
|
-
* @param l_mat - The left matrix operand
|
|
130
|
-
* @param r_mat - The right matrix operand
|
|
131
|
-
* @returns A new MutableMatrix22 containing the multiplication result
|
|
132
|
-
*/
|
|
133
|
-
static multiply(l_mat: IMatrix22, r_mat: IMatrix22): MutableMatrix22;
|
|
134
87
|
/**
|
|
135
88
|
* Creates a deep copy of this matrix.
|
|
136
89
|
*
|
|
@@ -142,7 +95,7 @@ export declare class MutableMatrix22 extends Matrix22 implements IMutableMatrix,
|
|
|
142
95
|
*
|
|
143
96
|
* @returns The internal Float32Array in column-major order
|
|
144
97
|
*/
|
|
145
|
-
raw():
|
|
98
|
+
raw(): TypedArray;
|
|
146
99
|
/**
|
|
147
100
|
* Sets the value at the specified row and column position.
|
|
148
101
|
*
|
|
@@ -195,11 +148,23 @@ export declare class MutableMatrix22 extends Matrix22 implements IMutableMatrix,
|
|
|
195
148
|
* @returns This matrix instance for method chaining
|
|
196
149
|
*/
|
|
197
150
|
transpose(): MutableMatrix22;
|
|
151
|
+
/**
|
|
152
|
+
* Attempts to invert this matrix in place.
|
|
153
|
+
*
|
|
154
|
+
* The matrix is left unchanged when it is numerically singular, which
|
|
155
|
+
* lets callers keep the previous valid value.
|
|
156
|
+
*
|
|
157
|
+
* @returns True if the inversion succeeded, false if the matrix is singular
|
|
158
|
+
*/
|
|
159
|
+
tryInvert(): boolean;
|
|
198
160
|
/**
|
|
199
161
|
* Inverts this matrix in place.
|
|
200
162
|
*
|
|
163
|
+
* If the matrix is numerically singular, it is set to the identity matrix
|
|
164
|
+
* instead of being filled with `Infinity`/`NaN`.
|
|
165
|
+
* Use {@link MutableMatrix22.tryInvert} when the caller needs to detect the failure.
|
|
166
|
+
*
|
|
201
167
|
* @returns This matrix instance for method chaining
|
|
202
|
-
* @throws Error if the matrix is not invertible (determinant is 0)
|
|
203
168
|
*/
|
|
204
169
|
invert(): MutableMatrix22;
|
|
205
170
|
/**
|
|
@@ -237,84 +202,114 @@ export declare class MutableMatrix22 extends Matrix22 implements IMutableMatrix,
|
|
|
237
202
|
* @returns This matrix instance for method chaining
|
|
238
203
|
*/
|
|
239
204
|
multiplyByLeft(mat: IMatrix22): MutableMatrix22;
|
|
205
|
+
}
|
|
206
|
+
export declare class MutableMatrix22 extends MutableMatrix22_<Float32ArrayConstructor> {
|
|
240
207
|
/**
|
|
241
|
-
* Creates a new
|
|
242
|
-
*
|
|
243
|
-
* in the same order they appear visually in the matrix.
|
|
244
|
-
*
|
|
245
|
-
* @param m00 - Value for position (0,0)
|
|
246
|
-
* @param m01 - Value for position (0,1)
|
|
247
|
-
* @param m10 - Value for position (1,0)
|
|
248
|
-
* @param m11 - Value for position (1,1)
|
|
249
|
-
* @returns A new MutableMatrix22 instance
|
|
208
|
+
* Creates a new MutableMatrix22 instance.
|
|
209
|
+
* @param m - The typed array containing the matrix components
|
|
250
210
|
*/
|
|
211
|
+
constructor(m: TypedArray);
|
|
212
|
+
/** Creates a zero matrix. */
|
|
213
|
+
static zero(): MutableMatrix22;
|
|
214
|
+
/** Creates an identity matrix. */
|
|
215
|
+
static identity(): MutableMatrix22;
|
|
216
|
+
/** Creates a dummy matrix with an empty array. */
|
|
217
|
+
static dummy(): MutableMatrix22;
|
|
218
|
+
/** Creates the transpose of the given matrix. */
|
|
219
|
+
static transpose(mat: IMatrix22): MutableMatrix22;
|
|
220
|
+
/** Attempts to invert the given matrix, returning null when it is singular. */
|
|
221
|
+
static tryInvert(mat: IMatrix22): MutableMatrix22 | null;
|
|
222
|
+
/** Creates the inverse of the given matrix (identity when singular). */
|
|
223
|
+
static invert(mat: IMatrix22): MutableMatrix22;
|
|
224
|
+
/** Attempts to invert the given matrix into outMat. */
|
|
225
|
+
static tryInvertTo<T extends IMutableMatrix22>(mat: IMatrix22, outMat: T): boolean;
|
|
226
|
+
/** Inverts the given matrix into outMat (identity when singular). */
|
|
227
|
+
static invertTo<T extends IMutableMatrix22>(mat: IMatrix22, outMat: T): T;
|
|
228
|
+
/** Creates a 2D rotation matrix. */
|
|
229
|
+
static rotate(radian: number): MutableMatrix22;
|
|
230
|
+
/** Creates a 2D scaling matrix. */
|
|
231
|
+
static scale(vec: IVector2): MutableMatrix22;
|
|
232
|
+
/** Multiplies two 2x2 matrices. */
|
|
233
|
+
static multiply(l_mat: IMatrix22, r_mat: IMatrix22): MutableMatrix22;
|
|
234
|
+
/** Multiplies two matrices and stores the result in outMat. */
|
|
235
|
+
static multiplyTo<T extends IMutableMatrix22>(l_mat: IMatrix22, r_mat: IMatrix22, outMat: T): T;
|
|
236
|
+
/** Creates a matrix from row-major components. */
|
|
251
237
|
static fromCopy4RowMajor(m00: number, m01: number, m10: number, m11: number): MutableMatrix22;
|
|
252
|
-
/**
|
|
253
|
-
* Creates a new matrix from values provided in column-major order.
|
|
254
|
-
* This matches the internal storage format used by WebGL.
|
|
255
|
-
*
|
|
256
|
-
* @param m00 - Value for position (0,0)
|
|
257
|
-
* @param m10 - Value for position (1,0)
|
|
258
|
-
* @param m01 - Value for position (0,1)
|
|
259
|
-
* @param m11 - Value for position (1,1)
|
|
260
|
-
* @returns A new MutableMatrix22 instance
|
|
261
|
-
*/
|
|
238
|
+
/** Creates a matrix from column-major components. */
|
|
262
239
|
static fromCopy4ColumnMajor(m00: number, m10: number, m01: number, m11: number): MutableMatrix22;
|
|
263
|
-
/**
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
* @returns A new MutableMatrix22 instance sharing the provided array
|
|
269
|
-
*/
|
|
270
|
-
static fromFloat32ArrayColumnMajor(float32Array: Float32Array): MutableMatrix22;
|
|
271
|
-
/**
|
|
272
|
-
* Creates a new matrix by copying from a Float32Array in column-major order.
|
|
273
|
-
*
|
|
274
|
-
* @param float32Array - Float32Array containing matrix data in column-major order
|
|
275
|
-
* @returns A new MutableMatrix22 instance with copied data
|
|
276
|
-
*/
|
|
277
|
-
static fromCopyFloat32ArrayColumnMajor(float32Array: Float32Array): MutableMatrix22;
|
|
278
|
-
/**
|
|
279
|
-
* Creates a new matrix by copying from a Float32Array in row-major order.
|
|
280
|
-
*
|
|
281
|
-
* @param array - Float32Array containing matrix data in row-major order
|
|
282
|
-
* @returns A new MutableMatrix22 instance with converted data
|
|
283
|
-
*/
|
|
240
|
+
/** Creates a matrix that directly uses the given Float32Array. */
|
|
241
|
+
static fromFloat32ArrayColumnMajor(array: Float32Array): MutableMatrix22;
|
|
242
|
+
/** Creates a matrix by copying a Float32Array in column-major order. */
|
|
243
|
+
static fromCopyFloat32ArrayColumnMajor(array: Float32Array): MutableMatrix22;
|
|
244
|
+
/** Creates a matrix by copying a Float32Array in row-major order. */
|
|
284
245
|
static fromCopyFloat32ArrayRowMajor(array: Float32Array): MutableMatrix22;
|
|
285
|
-
/**
|
|
286
|
-
* Creates a new matrix by copying from another Matrix22 instance.
|
|
287
|
-
*
|
|
288
|
-
* @param mat - The source Matrix22 to copy from
|
|
289
|
-
* @returns A new MutableMatrix22 instance with copied data
|
|
290
|
-
*/
|
|
246
|
+
/** Creates a matrix by copying another matrix. */
|
|
291
247
|
static fromCopyMatrix22(mat: IMatrix22): MutableMatrix22;
|
|
292
|
-
/**
|
|
293
|
-
* Creates a new matrix from a 4-element array in column-major order.
|
|
294
|
-
*
|
|
295
|
-
* @param array - Array4 containing matrix data in column-major order
|
|
296
|
-
* @returns A new MutableMatrix22 instance with copied data
|
|
297
|
-
*/
|
|
248
|
+
/** Creates a matrix from a 4-element array in column-major order. */
|
|
298
249
|
static fromCopyArray9ColumnMajor(array: Array4<number>): MutableMatrix22;
|
|
299
|
-
/**
|
|
300
|
-
* Creates a new matrix from an array in column-major order.
|
|
301
|
-
*
|
|
302
|
-
* @param array - Array containing matrix data in column-major order
|
|
303
|
-
* @returns A new MutableMatrix22 instance with copied data
|
|
304
|
-
*/
|
|
250
|
+
/** Creates a matrix from an array in column-major order. */
|
|
305
251
|
static fromCopyArrayColumnMajor(array: Array<number>): MutableMatrix22;
|
|
306
|
-
/**
|
|
307
|
-
* Creates a new matrix from a 4-element array in row-major order.
|
|
308
|
-
*
|
|
309
|
-
* @param array - Array4 containing matrix data in row-major order
|
|
310
|
-
* @returns A new MutableMatrix22 instance with converted data
|
|
311
|
-
*/
|
|
252
|
+
/** Creates a matrix from a 4-element array in row-major order. */
|
|
312
253
|
static fromCopyArray9RowMajor(array: Array4<number>): MutableMatrix22;
|
|
313
|
-
/**
|
|
314
|
-
* Creates a new matrix from an array in row-major order.
|
|
315
|
-
*
|
|
316
|
-
* @param array - Array containing matrix data in row-major order
|
|
317
|
-
* @returns A new MutableMatrix22 instance with converted data
|
|
318
|
-
*/
|
|
254
|
+
/** Creates a matrix from an array in row-major order. */
|
|
319
255
|
static fromCopyArrayRowMajor(array: Array<number>): MutableMatrix22;
|
|
320
256
|
}
|
|
257
|
+
/**
|
|
258
|
+
* Immutable 2x2 matrix with 64-bit float components.
|
|
259
|
+
* Use this implementation when higher numerical precision is required.
|
|
260
|
+
*/
|
|
261
|
+
export declare class MutableMatrix22D extends MutableMatrix22_<Float64ArrayConstructor> {
|
|
262
|
+
/**
|
|
263
|
+
* Creates a new MutableMatrix22D instance.
|
|
264
|
+
* @param m - The typed array containing the matrix components
|
|
265
|
+
*/
|
|
266
|
+
private constructor();
|
|
267
|
+
/** Creates a zero matrix. */
|
|
268
|
+
static zero(): MutableMatrix22D;
|
|
269
|
+
/** Creates an identity matrix. */
|
|
270
|
+
static identity(): MutableMatrix22D;
|
|
271
|
+
/** Creates a dummy matrix with an empty array. */
|
|
272
|
+
static dummy(): MutableMatrix22D;
|
|
273
|
+
/** Creates the transpose of the given matrix. */
|
|
274
|
+
static transpose(mat: IMatrix22): MutableMatrix22D;
|
|
275
|
+
/** Attempts to invert the given matrix, returning null when it is singular. */
|
|
276
|
+
static tryInvert(mat: IMatrix22): MutableMatrix22D | null;
|
|
277
|
+
/** Creates the inverse of the given matrix (identity when singular). */
|
|
278
|
+
static invert(mat: IMatrix22): MutableMatrix22D;
|
|
279
|
+
/** Attempts to invert the given matrix into outMat. */
|
|
280
|
+
static tryInvertTo<T extends IMutableMatrix22>(mat: IMatrix22, outMat: T): boolean;
|
|
281
|
+
/** Inverts the given matrix into outMat (identity when singular). */
|
|
282
|
+
static invertTo<T extends IMutableMatrix22>(mat: IMatrix22, outMat: T): T;
|
|
283
|
+
/** Creates a 2D rotation matrix. */
|
|
284
|
+
static rotate(radian: number): MutableMatrix22D;
|
|
285
|
+
/** Creates a 2D scaling matrix. */
|
|
286
|
+
static scale(vec: IVector2): MutableMatrix22D;
|
|
287
|
+
/** Multiplies two 2x2 matrices. */
|
|
288
|
+
static multiply(l_mat: IMatrix22, r_mat: IMatrix22): MutableMatrix22D;
|
|
289
|
+
/** Multiplies two matrices and stores the result in outMat. */
|
|
290
|
+
static multiplyTo<T extends IMutableMatrix22>(l_mat: IMatrix22, r_mat: IMatrix22, outMat: T): T;
|
|
291
|
+
/** Creates a matrix from row-major components. */
|
|
292
|
+
static fromCopy4RowMajor(m00: number, m01: number, m10: number, m11: number): MutableMatrix22D;
|
|
293
|
+
/** Creates a matrix from column-major components. */
|
|
294
|
+
static fromCopy4ColumnMajor(m00: number, m10: number, m01: number, m11: number): MutableMatrix22D;
|
|
295
|
+
/** Creates a matrix that directly uses the given Float64Array. */
|
|
296
|
+
static fromFloat64ArrayColumnMajor(array: Float64Array): MutableMatrix22D;
|
|
297
|
+
/** Creates a matrix by copying a Float64Array in column-major order. */
|
|
298
|
+
static fromCopyFloat64ArrayColumnMajor(array: Float64Array): MutableMatrix22D;
|
|
299
|
+
/** Creates a matrix by copying a Float64Array in row-major order. */
|
|
300
|
+
static fromCopyFloat64ArrayRowMajor(array: Float64Array): MutableMatrix22D;
|
|
301
|
+
/** Creates a matrix by copying another matrix. */
|
|
302
|
+
static fromCopyMatrix22(mat: IMatrix22): MutableMatrix22D;
|
|
303
|
+
/** Creates a matrix from a 4-element array in column-major order. */
|
|
304
|
+
static fromCopyArray9ColumnMajor(array: Array4<number>): MutableMatrix22D;
|
|
305
|
+
/** Creates a matrix from an array in column-major order. */
|
|
306
|
+
static fromCopyArrayColumnMajor(array: Array<number>): MutableMatrix22D;
|
|
307
|
+
/** Creates a matrix from a 4-element array in row-major order. */
|
|
308
|
+
static fromCopyArray9RowMajor(array: Array4<number>): MutableMatrix22D;
|
|
309
|
+
/** Creates a matrix from an array in row-major order. */
|
|
310
|
+
static fromCopyArrayRowMajor(array: Array<number>): MutableMatrix22D;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Alias for the 32-bit (Float32Array) implementation, making the precision explicit.
|
|
314
|
+
*/
|
|
315
|
+
export { MutableMatrix22 as MutableMatrix22F };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Array9, Index } from '../../types/CommonTypes';
|
|
1
|
+
import type { Array9, FloatTypedArrayConstructor, Index, TypedArray } from '../../types/CommonTypes';
|
|
2
2
|
import type { IMatrix33, IMatrix44, IMutableMatrix, IMutableMatrix33 } from './IMatrix';
|
|
3
3
|
import type { IQuaternion } from './IQuaternion';
|
|
4
4
|
import type { IVector3 } from './IVector';
|
|
5
|
-
import {
|
|
5
|
+
import { Matrix33_ } from './Matrix33';
|
|
6
6
|
/**
|
|
7
7
|
* A mutable 3x3 matrix class that extends Matrix33 and provides mutating operations.
|
|
8
8
|
* This class stores matrix data in column-major order as a Float32Array.
|
|
@@ -21,7 +21,15 @@ import { Matrix33 } from './Matrix33';
|
|
|
21
21
|
* | m20 m21 m22 |
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
|
-
export declare class
|
|
24
|
+
export declare class MutableMatrix33_<T extends FloatTypedArrayConstructor> extends Matrix33_<T> implements IMutableMatrix, IMutableMatrix33 {
|
|
25
|
+
/**
|
|
26
|
+
* Creates a new MutableMatrix33_ instance.
|
|
27
|
+
* @param m - The typed array containing the matrix components
|
|
28
|
+
* @param options - Configuration object containing the typed array constructor
|
|
29
|
+
*/
|
|
30
|
+
constructor(m: TypedArray, options: {
|
|
31
|
+
type: T;
|
|
32
|
+
});
|
|
25
33
|
/**
|
|
26
34
|
* Sets the matrix element at position (0,0).
|
|
27
35
|
* @param val - The value to set
|
|
@@ -117,78 +125,6 @@ export declare class MutableMatrix33 extends Matrix33 implements IMutableMatrix,
|
|
|
117
125
|
* @returns The string 'MutableMatrix33'
|
|
118
126
|
*/
|
|
119
127
|
get className(): string;
|
|
120
|
-
/**
|
|
121
|
-
* Creates a new zero matrix (all elements set to 0).
|
|
122
|
-
* @returns A new MutableMatrix33 instance with all elements set to 0
|
|
123
|
-
*/
|
|
124
|
-
static zero(): MutableMatrix33;
|
|
125
|
-
/**
|
|
126
|
-
* Creates a new identity matrix.
|
|
127
|
-
* @returns A new MutableMatrix33 instance representing the identity matrix
|
|
128
|
-
*/
|
|
129
|
-
static identity(): MutableMatrix33;
|
|
130
|
-
/**
|
|
131
|
-
* Creates a dummy matrix for testing purposes.
|
|
132
|
-
* @returns A new MutableMatrix33 instance with default values
|
|
133
|
-
*/
|
|
134
|
-
static dummy(): MutableMatrix33;
|
|
135
|
-
/**
|
|
136
|
-
* Creates a new matrix that is the transpose of the input matrix.
|
|
137
|
-
* @param mat - The matrix to transpose
|
|
138
|
-
* @returns A new MutableMatrix33 instance representing the transposed matrix
|
|
139
|
-
*/
|
|
140
|
-
static transpose(mat: IMatrix33): MutableMatrix33;
|
|
141
|
-
/**
|
|
142
|
-
* Creates a new matrix that is the inverse of the input matrix.
|
|
143
|
-
* @param mat - The matrix to invert
|
|
144
|
-
* @returns A new MutableMatrix33 instance representing the inverted matrix
|
|
145
|
-
*/
|
|
146
|
-
static invert(mat: IMatrix33): MutableMatrix33;
|
|
147
|
-
/**
|
|
148
|
-
* Creates a rotation matrix around the X-axis.
|
|
149
|
-
* @param radian - The rotation angle in radians
|
|
150
|
-
* @returns A new MutableMatrix33 instance representing the X-axis rotation
|
|
151
|
-
*/
|
|
152
|
-
static rotateX(radian: number): MutableMatrix33;
|
|
153
|
-
/**
|
|
154
|
-
* Creates a rotation matrix around the Y-axis.
|
|
155
|
-
* @param radian - The rotation angle in radians
|
|
156
|
-
* @returns A new MutableMatrix33 instance representing the Y-axis rotation
|
|
157
|
-
*/
|
|
158
|
-
static rotateY(radian: number): MutableMatrix33;
|
|
159
|
-
/**
|
|
160
|
-
* Creates a rotation matrix around the Z-axis.
|
|
161
|
-
* @param radian - The rotation angle in radians
|
|
162
|
-
* @returns A new MutableMatrix33 instance representing the Z-axis rotation
|
|
163
|
-
*/
|
|
164
|
-
static rotateZ(radian: number): MutableMatrix33;
|
|
165
|
-
/**
|
|
166
|
-
* Creates a rotation matrix for combined X, Y, and Z axis rotations applied in that order.
|
|
167
|
-
* @param x - Rotation angle around X-axis in radians
|
|
168
|
-
* @param y - Rotation angle around Y-axis in radians
|
|
169
|
-
* @param z - Rotation angle around Z-axis in radians
|
|
170
|
-
* @returns A new MutableMatrix33 instance representing the combined rotation
|
|
171
|
-
*/
|
|
172
|
-
static rotateXYZ(x: number, y: number, z: number): MutableMatrix33;
|
|
173
|
-
/**
|
|
174
|
-
* Creates a rotation matrix from a vector containing rotation angles.
|
|
175
|
-
* @param vec - A vector containing rotation angles for X, Y, and Z axes
|
|
176
|
-
* @returns A new MutableMatrix33 instance representing the rotation
|
|
177
|
-
*/
|
|
178
|
-
static rotate(vec: IVector3): MutableMatrix33;
|
|
179
|
-
/**
|
|
180
|
-
* Creates a scaling matrix from a vector.
|
|
181
|
-
* @param vec - A vector containing scale factors for X, Y, and Z axes
|
|
182
|
-
* @returns A new MutableMatrix33 instance representing the scaling transformation
|
|
183
|
-
*/
|
|
184
|
-
static scale(vec: IVector3): MutableMatrix33;
|
|
185
|
-
/**
|
|
186
|
-
* Multiplies two matrices and returns the result as a new matrix.
|
|
187
|
-
* @param l_mat - The left matrix operand
|
|
188
|
-
* @param r_mat - The right matrix operand
|
|
189
|
-
* @returns A new MutableMatrix33 instance representing l_mat * r_mat
|
|
190
|
-
*/
|
|
191
|
-
static multiply(l_mat: IMatrix33, r_mat: IMatrix33): MutableMatrix33;
|
|
192
128
|
/**
|
|
193
129
|
* Creates a copy of this matrix.
|
|
194
130
|
* @returns A new MutableMatrix33 instance with the same values
|
|
@@ -198,7 +134,7 @@ export declare class MutableMatrix33 extends Matrix33 implements IMutableMatrix,
|
|
|
198
134
|
* Gets the raw Float32Array containing the matrix data.
|
|
199
135
|
* @returns The underlying Float32Array in column-major order
|
|
200
136
|
*/
|
|
201
|
-
raw():
|
|
137
|
+
raw(): TypedArray;
|
|
202
138
|
/**
|
|
203
139
|
* Sets a value at the specified row and column position.
|
|
204
140
|
* @param row_i - The row index (0-2)
|
|
@@ -250,9 +186,22 @@ export declare class MutableMatrix33 extends Matrix33 implements IMutableMatrix,
|
|
|
250
186
|
* @returns This matrix instance for method chaining
|
|
251
187
|
*/
|
|
252
188
|
transpose(): MutableMatrix33;
|
|
189
|
+
/**
|
|
190
|
+
* Attempts to invert this matrix in place.
|
|
191
|
+
*
|
|
192
|
+
* The matrix is left unchanged when it is numerically singular, which
|
|
193
|
+
* lets callers keep the previous valid value.
|
|
194
|
+
*
|
|
195
|
+
* @returns True if the inversion succeeded, false if the matrix is singular
|
|
196
|
+
*/
|
|
197
|
+
tryInvert(): boolean;
|
|
253
198
|
/**
|
|
254
199
|
* Inverts this matrix in place using the determinant method.
|
|
255
|
-
*
|
|
200
|
+
*
|
|
201
|
+
* If the matrix is numerically singular, it is set to the identity matrix
|
|
202
|
+
* instead of being filled with `Infinity`/`NaN`.
|
|
203
|
+
* Use {@link MutableMatrix33.tryInvert} when the caller needs to detect the failure.
|
|
204
|
+
*
|
|
256
205
|
* @returns This matrix instance for method chaining
|
|
257
206
|
*/
|
|
258
207
|
invert(): MutableMatrix33;
|
|
@@ -316,101 +265,138 @@ export declare class MutableMatrix33 extends Matrix33 implements IMutableMatrix,
|
|
|
316
265
|
* @returns This matrix instance for method chaining
|
|
317
266
|
*/
|
|
318
267
|
multiplyByLeft(mat: IMatrix33): MutableMatrix33;
|
|
268
|
+
}
|
|
269
|
+
export declare class MutableMatrix33 extends MutableMatrix33_<Float32ArrayConstructor> {
|
|
319
270
|
/**
|
|
320
|
-
* Creates a new
|
|
321
|
-
*
|
|
322
|
-
* @param m00 - Element at position (0,0)
|
|
323
|
-
* @param m01 - Element at position (0,1)
|
|
324
|
-
* @param m02 - Element at position (0,2)
|
|
325
|
-
* @param m10 - Element at position (1,0)
|
|
326
|
-
* @param m11 - Element at position (1,1)
|
|
327
|
-
* @param m12 - Element at position (1,2)
|
|
328
|
-
* @param m20 - Element at position (2,0)
|
|
329
|
-
* @param m21 - Element at position (2,1)
|
|
330
|
-
* @param m22 - Element at position (2,2)
|
|
331
|
-
* @returns A new MutableMatrix33 instance
|
|
271
|
+
* Creates a new MutableMatrix33 instance.
|
|
272
|
+
* @param m - The typed array containing the matrix components
|
|
332
273
|
*/
|
|
274
|
+
constructor(m: TypedArray);
|
|
275
|
+
/** Creates a zero matrix. */
|
|
276
|
+
static zero(): MutableMatrix33;
|
|
277
|
+
/** Creates an identity matrix (optimized IdentityMatrix33 instance). */
|
|
278
|
+
static identity(): MutableMatrix33;
|
|
279
|
+
/** Creates a dummy matrix with an empty array. */
|
|
280
|
+
static dummy(): MutableMatrix33;
|
|
281
|
+
/** Creates the transpose of the given matrix. */
|
|
282
|
+
static transpose(mat: IMatrix33): MutableMatrix33;
|
|
283
|
+
/** Attempts to invert the given matrix, returning null when it is singular. */
|
|
284
|
+
static tryInvert(mat: IMatrix33): MutableMatrix33 | null;
|
|
285
|
+
/** Creates the inverse of the given matrix (identity when singular). */
|
|
286
|
+
static invert(mat: IMatrix33): MutableMatrix33;
|
|
287
|
+
/** Attempts to invert the given matrix into outMat. */
|
|
288
|
+
static tryInvertTo<T extends IMutableMatrix33>(mat: IMatrix33, outMat: T): boolean;
|
|
289
|
+
/** Inverts the given matrix into outMat (identity when singular). */
|
|
290
|
+
static invertTo<T extends IMutableMatrix33>(mat: IMatrix33, outMat: T): T;
|
|
291
|
+
/** Creates a rotation matrix around the X-axis. */
|
|
292
|
+
static rotateX(radian: number): MutableMatrix33;
|
|
293
|
+
/** Creates a rotation matrix around the Y-axis. */
|
|
294
|
+
static rotateY(radian: number): MutableMatrix33;
|
|
295
|
+
/** Creates a rotation matrix around the Z-axis. */
|
|
296
|
+
static rotateZ(radian: number): MutableMatrix33;
|
|
297
|
+
/** Creates a rotation matrix from Euler angles in XYZ order. */
|
|
298
|
+
static rotateXYZ(x: number, y: number, z: number): MutableMatrix33;
|
|
299
|
+
/** Creates a rotation matrix from a Vector3 containing Euler angles. */
|
|
300
|
+
static rotate(vec: IVector3): MutableMatrix33;
|
|
301
|
+
/** Creates a scaling matrix. */
|
|
302
|
+
static scale(vec: IVector3): MutableMatrix33;
|
|
303
|
+
/** Multiplies two matrices. */
|
|
304
|
+
static multiply(l_mat: IMatrix33, r_mat: IMatrix33): MutableMatrix33;
|
|
305
|
+
/** Multiplies two matrices and stores the result in outMat. */
|
|
306
|
+
static multiplyTo<T extends IMutableMatrix33>(l_mat: IMatrix33, r_mat: IMatrix33, outMat: T): T;
|
|
307
|
+
/** Creates a matrix from row-major components. */
|
|
333
308
|
static fromCopy9RowMajor(m00: number, m01: number, m02: number, m10: number, m11: number, m12: number, m20: number, m21: number, m22: number): MutableMatrix33;
|
|
334
|
-
/**
|
|
335
|
-
* Creates a new matrix from 9 values specified in column-major order.
|
|
336
|
-
* This matches the internal storage format of WebGL matrices.
|
|
337
|
-
* @param m00 - Element at position (0,0)
|
|
338
|
-
* @param m10 - Element at position (1,0)
|
|
339
|
-
* @param m20 - Element at position (2,0)
|
|
340
|
-
* @param m01 - Element at position (0,1)
|
|
341
|
-
* @param m11 - Element at position (1,1)
|
|
342
|
-
* @param m21 - Element at position (2,1)
|
|
343
|
-
* @param m02 - Element at position (0,2)
|
|
344
|
-
* @param m12 - Element at position (1,2)
|
|
345
|
-
* @param m22 - Element at position (2,2)
|
|
346
|
-
* @returns A new MutableMatrix33 instance
|
|
347
|
-
*/
|
|
309
|
+
/** Creates a matrix from column-major components. */
|
|
348
310
|
static fromCopy9ColumnMajor(m00: number, m10: number, m20: number, m01: number, m11: number, m21: number, m02: number, m12: number, m22: number): MutableMatrix33;
|
|
349
|
-
/**
|
|
350
|
-
* Creates a new 3x3 matrix by copying the upper-left 3x3 portion of a 4x4 matrix.
|
|
351
|
-
* @param mat - The 4x4 matrix to copy from
|
|
352
|
-
* @returns A new MutableMatrix33 instance
|
|
353
|
-
*/
|
|
311
|
+
/** Creates a matrix from the upper-left 3x3 portion of a 4x4 matrix. */
|
|
354
312
|
static fromCopyMatrix44(mat: IMatrix44): MutableMatrix33;
|
|
355
|
-
/**
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
*/
|
|
361
|
-
static fromFloat32ArrayColumnMajor(float32Array: Float32Array): MutableMatrix33;
|
|
362
|
-
/**
|
|
363
|
-
* Creates a new matrix by copying data from a Float32Array in column-major order.
|
|
364
|
-
* @param float32Array - A Float32Array containing the matrix data to copy
|
|
365
|
-
* @returns A new MutableMatrix33 instance with copied data
|
|
366
|
-
*/
|
|
367
|
-
static fromCopyFloat32ArrayColumnMajor(float32Array: Float32Array): MutableMatrix33;
|
|
368
|
-
/**
|
|
369
|
-
* Creates a new matrix by copying data from a Float32Array in row-major order.
|
|
370
|
-
* The data is converted to column-major order during the copy process.
|
|
371
|
-
* @param array - A Float32Array containing the matrix data in row-major order
|
|
372
|
-
* @returns A new MutableMatrix33 instance with converted data
|
|
373
|
-
*/
|
|
313
|
+
/** Creates a matrix that directly uses the given Float32Array. */
|
|
314
|
+
static fromFloat32ArrayColumnMajor(array: Float32Array): MutableMatrix33;
|
|
315
|
+
/** Creates a matrix by copying a Float32Array in column-major order. */
|
|
316
|
+
static fromCopyFloat32ArrayColumnMajor(array: Float32Array): MutableMatrix33;
|
|
317
|
+
/** Creates a matrix by copying a Float32Array in row-major order. */
|
|
374
318
|
static fromCopyFloat32ArrayRowMajor(array: Float32Array): MutableMatrix33;
|
|
375
|
-
/**
|
|
376
|
-
* Creates a new matrix by copying from another 3x3 matrix.
|
|
377
|
-
* @param mat - The source matrix to copy from
|
|
378
|
-
* @returns A new MutableMatrix33 instance with copied data
|
|
379
|
-
*/
|
|
319
|
+
/** Creates a matrix by copying another matrix. */
|
|
380
320
|
static fromCopyMatrix33(mat: IMatrix33): MutableMatrix33;
|
|
381
|
-
/**
|
|
382
|
-
* Creates a new matrix from a 9-element array in column-major order.
|
|
383
|
-
* @param array - An array containing exactly 9 numbers in column-major order
|
|
384
|
-
* @returns A new MutableMatrix33 instance
|
|
385
|
-
*/
|
|
321
|
+
/** Creates a matrix from a 9-element array in column-major order. */
|
|
386
322
|
static fromCopyArray9ColumnMajor(array: Array9<number>): MutableMatrix33;
|
|
387
|
-
/**
|
|
388
|
-
* Creates a new matrix from an array in column-major order.
|
|
389
|
-
* Only the first 9 elements are used if the array is larger.
|
|
390
|
-
* @param array - An array containing the matrix data in column-major order
|
|
391
|
-
* @returns A new MutableMatrix33 instance
|
|
392
|
-
*/
|
|
323
|
+
/** Creates a matrix from an array in column-major order. */
|
|
393
324
|
static fromCopyArrayColumnMajor(array: Array<number>): MutableMatrix33;
|
|
394
|
-
/**
|
|
395
|
-
* Creates a new matrix from a 9-element array in row-major order.
|
|
396
|
-
* The data is converted to column-major order during the creation process.
|
|
397
|
-
* @param array - An array containing exactly 9 numbers in row-major order
|
|
398
|
-
* @returns A new MutableMatrix33 instance
|
|
399
|
-
*/
|
|
325
|
+
/** Creates a matrix from a 9-element array in row-major order. */
|
|
400
326
|
static fromCopyArray9RowMajor(array: Array9<number>): MutableMatrix33;
|
|
401
|
-
/**
|
|
402
|
-
* Creates a new matrix from an array in row-major order.
|
|
403
|
-
* Only the first 9 elements are used if the array is larger.
|
|
404
|
-
* The data is converted to column-major order during the creation process.
|
|
405
|
-
* @param array - An array containing the matrix data in row-major order
|
|
406
|
-
* @returns A new MutableMatrix33 instance
|
|
407
|
-
*/
|
|
327
|
+
/** Creates a matrix from an array in row-major order. */
|
|
408
328
|
static fromCopyArrayRowMajor(array: Array<number>): MutableMatrix33;
|
|
409
|
-
/**
|
|
410
|
-
* Creates a new rotation matrix from a quaternion.
|
|
411
|
-
* Converts the quaternion representation to its equivalent 3x3 rotation matrix.
|
|
412
|
-
* @param q - The quaternion to convert (should be normalized)
|
|
413
|
-
* @returns A new MutableMatrix33 instance representing the rotation
|
|
414
|
-
*/
|
|
329
|
+
/** Creates a matrix from a quaternion representing a rotation. */
|
|
415
330
|
static fromCopyQuaternion(q: IQuaternion): MutableMatrix33;
|
|
416
331
|
}
|
|
332
|
+
/**
|
|
333
|
+
* Immutable 3x3 matrix with 64-bit float components.
|
|
334
|
+
* Use this implementation when higher numerical precision is required.
|
|
335
|
+
*/
|
|
336
|
+
export declare class MutableMatrix33D extends MutableMatrix33_<Float64ArrayConstructor> {
|
|
337
|
+
/**
|
|
338
|
+
* Creates a new MutableMatrix33D instance.
|
|
339
|
+
* @param m - The typed array containing the matrix components
|
|
340
|
+
*/
|
|
341
|
+
private constructor();
|
|
342
|
+
/** Creates a zero matrix. */
|
|
343
|
+
static zero(): MutableMatrix33D;
|
|
344
|
+
/** Creates an identity matrix. */
|
|
345
|
+
static identity(): MutableMatrix33D;
|
|
346
|
+
/** Creates a dummy matrix with an empty array. */
|
|
347
|
+
static dummy(): MutableMatrix33D;
|
|
348
|
+
/** Creates the transpose of the given matrix. */
|
|
349
|
+
static transpose(mat: IMatrix33): MutableMatrix33D;
|
|
350
|
+
/** Attempts to invert the given matrix, returning null when it is singular. */
|
|
351
|
+
static tryInvert(mat: IMatrix33): MutableMatrix33D | null;
|
|
352
|
+
/** Creates the inverse of the given matrix (identity when singular). */
|
|
353
|
+
static invert(mat: IMatrix33): MutableMatrix33D;
|
|
354
|
+
/** Attempts to invert the given matrix into outMat. */
|
|
355
|
+
static tryInvertTo<T extends IMutableMatrix33>(mat: IMatrix33, outMat: T): boolean;
|
|
356
|
+
/** Inverts the given matrix into outMat (identity when singular). */
|
|
357
|
+
static invertTo<T extends IMutableMatrix33>(mat: IMatrix33, outMat: T): T;
|
|
358
|
+
/** Creates a rotation matrix around the X-axis. */
|
|
359
|
+
static rotateX(radian: number): MutableMatrix33D;
|
|
360
|
+
/** Creates a rotation matrix around the Y-axis. */
|
|
361
|
+
static rotateY(radian: number): MutableMatrix33D;
|
|
362
|
+
/** Creates a rotation matrix around the Z-axis. */
|
|
363
|
+
static rotateZ(radian: number): MutableMatrix33D;
|
|
364
|
+
/** Creates a rotation matrix from Euler angles in XYZ order. */
|
|
365
|
+
static rotateXYZ(x: number, y: number, z: number): MutableMatrix33D;
|
|
366
|
+
/** Creates a rotation matrix from a Vector3 containing Euler angles. */
|
|
367
|
+
static rotate(vec: IVector3): MutableMatrix33D;
|
|
368
|
+
/** Creates a scaling matrix. */
|
|
369
|
+
static scale(vec: IVector3): MutableMatrix33D;
|
|
370
|
+
/** Multiplies two matrices. */
|
|
371
|
+
static multiply(l_mat: IMatrix33, r_mat: IMatrix33): MutableMatrix33D;
|
|
372
|
+
/** Multiplies two matrices and stores the result in outMat. */
|
|
373
|
+
static multiplyTo<T extends IMutableMatrix33>(l_mat: IMatrix33, r_mat: IMatrix33, outMat: T): T;
|
|
374
|
+
/** Creates a matrix from row-major components. */
|
|
375
|
+
static fromCopy9RowMajor(m00: number, m01: number, m02: number, m10: number, m11: number, m12: number, m20: number, m21: number, m22: number): MutableMatrix33D;
|
|
376
|
+
/** Creates a matrix from column-major components. */
|
|
377
|
+
static fromCopy9ColumnMajor(m00: number, m10: number, m20: number, m01: number, m11: number, m21: number, m02: number, m12: number, m22: number): MutableMatrix33D;
|
|
378
|
+
/** Creates a matrix from the upper-left 3x3 portion of a 4x4 matrix. */
|
|
379
|
+
static fromCopyMatrix44(mat: IMatrix44): MutableMatrix33D;
|
|
380
|
+
/** Creates a matrix that directly uses the given Float64Array. */
|
|
381
|
+
static fromFloat64ArrayColumnMajor(array: Float64Array): MutableMatrix33D;
|
|
382
|
+
/** Creates a matrix by copying a Float64Array in column-major order. */
|
|
383
|
+
static fromCopyFloat64ArrayColumnMajor(array: Float64Array): MutableMatrix33D;
|
|
384
|
+
/** Creates a matrix by copying a Float64Array in row-major order. */
|
|
385
|
+
static fromCopyFloat64ArrayRowMajor(array: Float64Array): MutableMatrix33D;
|
|
386
|
+
/** Creates a matrix by copying another matrix. */
|
|
387
|
+
static fromCopyMatrix33(mat: IMatrix33): MutableMatrix33D;
|
|
388
|
+
/** Creates a matrix from a 9-element array in column-major order. */
|
|
389
|
+
static fromCopyArray9ColumnMajor(array: Array9<number>): MutableMatrix33D;
|
|
390
|
+
/** Creates a matrix from an array in column-major order. */
|
|
391
|
+
static fromCopyArrayColumnMajor(array: Array<number>): MutableMatrix33D;
|
|
392
|
+
/** Creates a matrix from a 9-element array in row-major order. */
|
|
393
|
+
static fromCopyArray9RowMajor(array: Array9<number>): MutableMatrix33D;
|
|
394
|
+
/** Creates a matrix from an array in row-major order. */
|
|
395
|
+
static fromCopyArrayRowMajor(array: Array<number>): MutableMatrix33D;
|
|
396
|
+
/** Creates a matrix from a quaternion representing a rotation. */
|
|
397
|
+
static fromCopyQuaternion(q: IQuaternion): MutableMatrix33D;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Alias for the 32-bit (Float32Array) implementation, making the precision explicit.
|
|
401
|
+
*/
|
|
402
|
+
export { MutableMatrix33 as MutableMatrix33F };
|