UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

92 lines 2.62 kB
import { ATypedArrayTuple } from "../a-typed-array-tuple.js"; import { getMat2Ctor } from "./get-mat2-ctor.js"; import { populateTypedArrayConstructorMap } from "../../../runtime/rtti-interop.js"; /** * @public * Row major 2x2 matrix. * * @remarks * See static properties for constructors. Instances are not an extension of this class, but of the static members. */ export class Mat2 extends ATypedArrayTuple { static getCtor(ctor) { return Mat2.constructors.get(ctor); } /** * Component-wise equals. */ isEqualTo(_other) { throw new Error(); } update(..._args) { throw new Error(); } setIdentityMatrix() { throw new Error(); } getValueAt(_column, _row) { throw new Error(); } setValueAt(_column, _row, _value) { throw new Error(); } setScalingMatrix(_scalingFactor) { throw new Error(); } setTranslationMatrix(_translation) { throw new Error(); } scalarMultiply(_value, _result) { throw new Error(); } scalarAdd(_value, _result) { throw new Error(); } multiplyMat2(_mat, _result) { throw new Error(); } getVec2MultiplyX(_x) { throw new Error(); } getRow(_row, _writeTo) { throw new Error(); } setRow(_row, _writeFrom) { throw new Error(); } getLoggableValue() { throw new Error(); } /** * If endianness is not supplied the platform's endianness will be used. */ copyFromBuffer(_memoryDataView, _pointer, _littleEndian) { throw new Error(); } /** * If endianness is not supplied the platform's endianness will be used. */ copyToBuffer(_memoryDataView, _pointer, _littleEndian) { throw new Error(); } /** * Although the typed array tuples extend a typed array, they are not structurally compatible. * This function returns the argument passed without modification but cast as the underlying storage type, e.g. Float32Array. */ castToBaseType() { throw new Error(); } } Mat2.f64 = getMat2Ctor(Float64Array); Mat2.f32 = getMat2Ctor(Float32Array); Mat2.i64 = null; // not supported Mat2.u64 = null; // not supported Mat2.u32 = getMat2Ctor(Uint32Array); Mat2.i32 = getMat2Ctor(Int32Array); Mat2.u16 = getMat2Ctor(Uint16Array); Mat2.i16 = getMat2Ctor(Int16Array); Mat2.u8c = getMat2Ctor(Uint8ClampedArray); Mat2.u8 = getMat2Ctor(Uint8Array); Mat2.i8 = getMat2Ctor(Int8Array); Mat2.constructors = populateTypedArrayConstructorMap(Mat2); //# sourceMappingURL=mat2.js.map