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.

90 lines 2.71 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Vec3 = void 0; const a_typed_array_tuple_js_1 = require("../a-typed-array-tuple.js"); const get_vec3_ctor_js_1 = require("./get-vec3-ctor.js"); const rtti_interop_js_1 = require("../../../runtime/rtti-interop.js"); /** * @public * Vector 3. * * @remarks * See static properties for constructors. Instances are not an extension of this class, but of the static members. */ class Vec3 extends a_typed_array_tuple_js_1.ATypedArrayTuple { static getCtor(ctor) { return Vec3.constructors.get(ctor); } /** * Component-wise equals. */ isEqualTo(_other) { throw new Error(); } getX() { throw new Error(); } getY() { throw new Error(); } getZ() { throw new Error(); } getMagnitude() { throw new Error(); } getMagnitudeSquared() { throw new Error(); } dotProduct(_vec) { throw new Error(); } update(_x, _y, _z) { throw new Error(); } setX(_x) { throw new Error(); } setY(_y) { throw new Error(); } setZ(_z) { 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(); } } exports.Vec3 = Vec3; Vec3.f64 = (0, get_vec3_ctor_js_1.getVec3Ctor)(Float64Array); Vec3.f32 = (0, get_vec3_ctor_js_1.getVec3Ctor)(Float32Array); Vec3.i64 = null; // not supported Vec3.u64 = null; // not supported Vec3.u32 = (0, get_vec3_ctor_js_1.getVec3Ctor)(Uint32Array); Vec3.i32 = (0, get_vec3_ctor_js_1.getVec3Ctor)(Int32Array); Vec3.u16 = (0, get_vec3_ctor_js_1.getVec3Ctor)(Uint16Array); Vec3.i16 = (0, get_vec3_ctor_js_1.getVec3Ctor)(Int16Array); Vec3.u8c = (0, get_vec3_ctor_js_1.getVec3Ctor)(Uint8ClampedArray); Vec3.u8 = (0, get_vec3_ctor_js_1.getVec3Ctor)(Uint8Array); Vec3.i8 = (0, get_vec3_ctor_js_1.getVec3Ctor)(Int8Array); Vec3.constructors = (0, rtti_interop_js_1.populateTypedArrayConstructorMap)(Vec3); //# sourceMappingURL=vec3.js.map