Home > rc-js-util > Vec3
Vector 3.
Signature:
export declare abstract class Vec3<TArray extends TTypedArray> extends ATypedArrayTuple<3, TArray>
Extends: ATypedArrayTuple
See static properties for constructors. Instances are not an extension of this class, but of the static members.
Property | Modifiers | Type | Description |
---|---|---|---|
“0” | number | x | |
“1” | number | y | |
“2” | number | z | |
constructor | IVec3Ctor<TArray> | ||
constructors | static |
Map<TTypedArrayCtor, Function> | |
f32 | static |
IVec3Ctor<Float32Array> | |
f64 | static |
IVec3Ctor<Float64Array> | |
i16 | static |
IVec3Ctor<Int16Array> | |
i32 | static |
IVec3Ctor<Int32Array> | |
i8 | static |
IVec3Ctor<Int8Array> | |
TTypeGuardVec3 | true | ||
u16 | static |
IVec3Ctor<Uint16Array> | |
u32 | static |
IVec3Ctor<Uint32Array> | |
u8 | static |
IVec3Ctor<Uint8Array> | |
u8c | static |
IVec3Ctor<Uint8ClampedArray> |
Method | Modifiers | Description |
---|---|---|
castToBaseType() | 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. | |
copyFromBuffer(_memoryDataView, _pointer, _littleEndian) | If endianness is not supplied the platform’s endianness will be used. | |
copyToBuffer(_memoryDataView, _pointer, _littleEndian) | If endianness is not supplied the platform’s endianness will be used. | |
dotProduct(_vec) | ||
getCtor(ctor) | static |
|
getLoggableValue() | ||
getMagnitude() | ||
getMagnitudeSquared() | ||
getX() | ||
getY() | ||
getZ() | ||
isEqualTo(_other) | Component-wise equals. | |
setX(_x) | ||
setY(_y) | ||
setZ(_z) | ||
update(_x, _y, _z) |