Function
Static Public Summary | ||
public |
Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix |
|
public |
add(out: mat2, a: ReadonlyMat2, b: ReadonlyMat2): mat2 Adds two mat2's |
|
public |
add(out: mat2d, a: ReadonlyMat2d, b: ReadonlyMat2d): mat2d Adds two mat2d's |
|
public |
add(out: mat3, a: ReadonlyMat3, b: ReadonlyMat3): mat3 Adds two mat3's |
|
public |
add(out: mat4, a: ReadonlyMat4, b: ReadonlyMat4): mat4 Adds two mat4's |
|
public |
add(out: quat2, a: ReadonlyQuat2, b: ReadonlyQuat2): quat2 Adds two dual quat's |
|
public |
add(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 Adds two vec2's |
|
public |
add(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 Adds two vec3's |
|
public |
add(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 Adds two vec4's |
|
public |
adjoint(out: mat2, a: ReadonlyMat2): mat2 Calculates the adjugate of a mat2 |
|
public |
adjoint(out: mat3, a: ReadonlyMat3): mat3 Calculates the adjugate of a mat3 |
|
public |
adjoint(out: mat4, a: ReadonlyMat4): mat4 Calculates the adjugate of a mat4 |
|
public |
Get the angle between two 2D vectors |
|
public |
Get the angle between two 3D vectors |
|
public |
bezier(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, c: ReadonlyVec3, d: ReadonlyVec3, t: Number): vec3 Performs a bezier interpolation with two control points |
|
public |
calculateW(out: quat, a: ReadonlyQuat): quat Calculates the W component of a quat from the X, Y, and Z components. |
|
public |
ceil(out: vec2, a: ReadonlyVec2): vec2 Math.ceil the components of a vec2 |
|
public |
ceil(out: vec3, a: ReadonlyVec3): vec3 Math.ceil the components of a vec3 |
|
public |
ceil(out: vec4, a: ReadonlyVec4): vec4 Math.ceil the components of a vec4 |
|
public |
clone(a: ReadonlyMat2): mat2 Creates a new mat2 initialized with values from an existing matrix |
|
public |
clone(a: ReadonlyMat2d): mat2d Creates a new mat2d initialized with values from an existing matrix |
|
public |
clone(a: ReadonlyMat3): mat3 Creates a new mat3 initialized with values from an existing matrix |
|
public |
clone(a: ReadonlyMat4): mat4 Creates a new mat4 initialized with values from an existing matrix |
|
public |
clone(a: ReadonlyQuat2): quat2 Creates a new quat initialized with values from an existing quaternion |
|
public |
clone(a: ReadonlyVec2): vec2 Creates a new vec2 initialized with values from an existing vector |
|
public |
clone(a: ReadonlyVec3): vec3 Creates a new vec3 initialized with values from an existing vector |
|
public |
clone(a: ReadonlyVec4): vec4 Creates a new vec4 initialized with values from an existing vector |
|
public |
conjugate(out: quat, a: ReadonlyQuat): quat Calculates the conjugate of a quat If the quaternion is normalized, this function is faster than quat.inverse and produces the same result. |
|
public |
conjugate(out: quat2, a: ReadonlyQuat2): quat2 Calculates the conjugate of a dual quat If the dual quaternion is normalized, this function is faster than quat2.inverse and produces the same result. |
|
public |
copy(out: mat2, a: ReadonlyMat2): mat2 Copy the values from one mat2 to another |
|
public |
copy(out: mat2d, a: ReadonlyMat2d): mat2d Copy the values from one mat2d to another |
|
public |
copy(out: mat3, a: ReadonlyMat3): mat3 Copy the values from one mat3 to another |
|
public |
copy(out: mat4, a: ReadonlyMat4): mat4 Copy the values from one mat4 to another |
|
public |
copy(out: quat2, a: ReadonlyQuat2): quat2 Copy the values from one dual quat to another |
|
public |
copy(out: vec2, a: ReadonlyVec2): vec2 Copy the values from one vec2 to another |
|
public |
copy(out: vec3, a: ReadonlyVec3): vec3 Copy the values from one vec3 to another |
|
public |
copy(out: vec4, a: ReadonlyVec4): vec4 Copy the values from one vec4 to another |
|
public |
create(): mat2 Creates a new identity mat2 |
|
public |
create(): mat2d Creates a new identity mat2d |
|
public |
create(): mat3 Creates a new identity mat3 |
|
public |
create(): mat4 Creates a new identity mat4 |
|
public |
create(): quat Creates a new identity quat |
|
public |
create(): quat2 Creates a new identity dual quat |
|
public |
create(): vec2 Creates a new, empty vec2 |
|
public |
create(): vec3 Creates a new, empty vec3 |
|
public |
create(): vec4 Creates a new, empty vec4 |
|
public |
cross(out: vec3, a: ReadonlyVec2, b: ReadonlyVec2): vec3 Computes the cross product of two vec2's Note that the cross product must by definition produce a 3D vector |
|
public |
cross(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 Computes the cross product of two vec3's |
|
public |
cross(result: ReadonlyVec4, U: ReadonlyVec4, V: ReadonlyVec4, W: ReadonlyVec4): vec4 Returns the cross-product of three vectors in a 4-dimensional space |
|
public |
determinant(a: ReadonlyMat2): Number Calculates the determinant of a mat2 |
|
public |
determinant(a: ReadonlyMat2d): Number Calculates the determinant of a mat2d |
|
public |
determinant(a: ReadonlyMat3): Number Calculates the determinant of a mat3 |
|
public |
determinant(a: ReadonlyMat4): Number Calculates the determinant of a mat4 |
|
public |
Calculates the euclidian distance between two vec2's |
|
public |
Calculates the euclidian distance between two vec3's |
|
public |
Calculates the euclidian distance between two vec4's |
|
public |
divide(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 Divides two vec2's |
|
public |
divide(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 Divides two vec3's |
|
public |
divide(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 Divides two vec4's |
|
public |
Calculates the dot product of two vec2's |
|
public |
Calculates the dot product of two vec3's |
|
public |
Calculates the dot product of two vec4's |
|
public |
Tests whether or not the arguments have approximately the same value, within an absolute or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less than or equal to 1.0, and a relative tolerance is used for larger values) |
|
public |
Returns whether or not the matrices have approximately the same elements in the same position. |
|
public |
Returns whether or not the matrices have approximately the same elements in the same position. |
|
public |
Returns whether or not the matrices have approximately the same elements in the same position. |
|
public |
Returns whether or not the matrices have approximately the same elements in the same position. |
|
public |
Returns whether or not the dual quaternions have approximately the same elements in the same position. |
|
public |
Returns whether or not the vectors have approximately the same elements in the same position. |
|
public |
Returns whether or not the vectors have approximately the same elements in the same position. |
|
public |
Returns whether or not the vectors have approximately the same elements in the same position. |
|
public |
exactEquals(a: ReadonlyMat2, b: ReadonlyMat2): Boolean Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) |
|
public |
exactEquals(a: ReadonlyMat2d, b: ReadonlyMat2d): Boolean Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) |
|
public |
exactEquals(a: ReadonlyMat3, b: ReadonlyMat3): Boolean Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) |
|
public |
exactEquals(a: ReadonlyMat4, b: ReadonlyMat4): Boolean Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) |
|
public |
exactEquals(a: ReadonlyQuat2, b: ReadonlyQuat2): Boolean Returns whether or not the dual quaternions have exactly the same elements in the same position (when compared with ===) |
|
public |
exactEquals(a: ReadonlyVec2, b: ReadonlyVec2): Boolean Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===) |
|
public |
exactEquals(a: ReadonlyVec3, b: ReadonlyVec3): Boolean Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===) |
|
public |
exactEquals(a: ReadonlyVec4, b: ReadonlyVec4): Boolean Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===) |
|
public |
exp(out: quat, a: ReadonlyQuat): quat Calculate the exponential of a unit quaternion. |
|
public |
floor(out: vec2, a: ReadonlyVec2): vec2 Math.floor the components of a vec2 |
|
public |
floor(out: vec3, a: ReadonlyVec3): vec3 Math.floor the components of a vec3 |
|
public |
floor(out: vec4, a: ReadonlyVec4): vec4 Math.floor the components of a vec4 |
|
public |
Returns Frobenius norm of a mat2 |
|
public |
Returns Frobenius norm of a mat2d |
|
public |
Returns Frobenius norm of a mat3 |
|
public |
Returns Frobenius norm of a mat4 |
|
public |
fromEuler(out: quat, Angle: x, Angle: y, Angle: z): quat Creates a quaternion from the given euler angle x, y, z. |
|
public |
fromMat2d(out: mat3, a: ReadonlyMat2d): mat3 Copies the values from a mat2d into a mat3 |
|
public |
fromMat3(out: quat, m: ReadonlyMat3): quat Creates a quaternion from the given 3x3 rotation matrix. |
|
public |
fromMat4(out: mat3, a: ReadonlyMat4): mat3 Copies the upper-left 3x3 values into the given mat3. |
|
public |
fromMat4(out: quat2, a: ReadonlyMat4): quat2 Creates a new dual quat from a matrix (4x4) |
|
public |
fromQuat(out: mat3, q: ReadonlyQuat): mat3 Calculates a 3x3 matrix from the given quaternion |
|
public |
fromQuat(out: mat4, q: ReadonlyQuat): mat4 Calculates a 4x4 matrix from the given quaternion |
|
public |
fromQuat2(out: mat4, a: ReadonlyQuat2): mat4 Creates a new mat4 from a dual quat. |
|
public |
fromRotation(out: mat2, rad: Number): mat2 Creates a matrix from a given angle This is equivalent to (but much faster than): |
|
public |
fromRotation(out: mat2d, rad: Number): mat2d Creates a matrix from a given angle This is equivalent to (but much faster than): |
|
public |
fromRotation(out: mat3, rad: Number): mat3 Creates a matrix from a given angle This is equivalent to (but much faster than): |
|
public |
fromRotation(out: mat4, rad: Number, axis: ReadonlyVec3): mat4 Creates a matrix from a given angle around a given axis This is equivalent to (but much faster than): |
|
public |
fromRotation(dual: ReadonlyQuat2, q: ReadonlyQuat): quat2 Creates a dual quat from a quaternion |
|
public |
fromRotationTranslation(out: mat4, q: quat4, v: ReadonlyVec3): mat4 Creates a matrix from a quaternion rotation and vector translation This is equivalent to (but much faster than): |
|
public |
fromRotationTranslation(dual: ReadonlyQuat2, q: ReadonlyQuat, t: ReadonlyVec3): quat2 Creates a dual quat from a quaternion and a translation |
|
public |
fromRotationTranslationScale(out: mat4, q: quat4, v: ReadonlyVec3, s: ReadonlyVec3): mat4 Creates a matrix from a quaternion rotation, vector translation and vector scale This is equivalent to (but much faster than): |
|
public |
fromRotationTranslationScaleOrigin(out: mat4, q: quat4, v: ReadonlyVec3, s: ReadonlyVec3, o: ReadonlyVec3): mat4 Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin This is equivalent to (but much faster than): |
|
public |
fromRotationTranslationValues(x1: Number, y1: Number, z1: Number, w1: Number, x2: Number, y2: Number, z2: Number): quat2 Creates a new dual quat from the given values (quat and translation) |
|
public |
fromScaling(out: mat2, v: ReadonlyVec2): mat2 Creates a matrix from a vector scaling This is equivalent to (but much faster than): |
|
public |
fromScaling(out: mat2d, v: ReadonlyVec2): mat2d Creates a matrix from a vector scaling This is equivalent to (but much faster than): |
|
public |
fromScaling(out: mat3, v: ReadonlyVec2): mat3 Creates a matrix from a vector scaling This is equivalent to (but much faster than): |
|
public |
fromScaling(out: mat4, v: ReadonlyVec3): mat4 Creates a matrix from a vector scaling This is equivalent to (but much faster than): |
|
public |
fromTranslation(out: mat2d, v: ReadonlyVec2): mat2d Creates a matrix from a vector translation This is equivalent to (but much faster than): |
|
public |
fromTranslation(out: mat3, v: ReadonlyVec2): mat3 Creates a matrix from a vector translation This is equivalent to (but much faster than): |
|
public |
fromTranslation(out: mat4, v: ReadonlyVec3): mat4 Creates a matrix from a vector translation This is equivalent to (but much faster than): |
|
public |
fromTranslation(dual: ReadonlyQuat2, t: ReadonlyVec3): quat2 Creates a dual quat from a translation |
|
public |
fromValues(m00: Number, m01: Number, m10: Number, m11: Number): mat2 Create a new mat2 with the given values |
|
public |
Create a new mat2d with the given values |
|
public |
fromValues(m00: Number, m01: Number, m02: Number, m10: Number, m11: Number, m12: Number, m20: Number, m21: Number, m22: Number): mat3 Create a new mat3 with the given values |
|
public |
fromValues(m00: Number, m01: Number, m02: Number, m03: Number, m10: Number, m11: Number, m12: Number, m13: Number, m20: Number, m21: Number, m22: Number, m23: Number, m30: Number, m31: Number, m32: Number, m33: Number): mat4 Create a new mat4 with the given values |
|
public |
fromValues(x1: Number, y1: Number, z1: Number, w1: Number, x2: Number, y2: Number, z2: Number, w2: Number): quat2 Creates a new dual quat initialized with the given values |
|
public |
fromValues(x: Number, y: Number): vec2 Creates a new vec2 initialized with the given values |
|
public |
fromValues(x: Number, y: Number, z: Number): vec3 Creates a new vec3 initialized with the given values |
|
public |
fromValues(x: Number, y: Number, z: Number, w: Number): vec4 Creates a new vec4 initialized with the given values |
|
public |
fromXRotation(out: mat4, rad: Number): mat4 Creates a matrix from the given angle around the X axis This is equivalent to (but much faster than): |
|
public |
fromYRotation(out: mat4, rad: Number): mat4 Creates a matrix from the given angle around the Y axis This is equivalent to (but much faster than): |
|
public |
fromZRotation(out: mat4, rad: Number): mat4 Creates a matrix from the given angle around the Z axis This is equivalent to (but much faster than): |
|
public |
frustum(out: mat4, left: Number, right: Number, bottom: Number, top: Number, near: Number, far: Number): mat4 Generates a frustum matrix with the given bounds |
|
public |
Gets the angular distance between two unit quaternions |
|
public |
getAxisAngle(out_axis: vec3, q: ReadonlyQuat): Number Gets the rotation axis and angle for a given quaternion. |
|
public |
getDual(out: quat, a: ReadonlyQuat2): quat Gets the dual part of a dual quat |
|
public |
getRotation(out: quat, mat: ReadonlyMat4): quat Returns a quaternion representing the rotational component of a transformation matrix. |
|
public |
getScaling(out: vec3, mat: ReadonlyMat4): vec3 Returns the scaling factor component of a transformation matrix. |
|
public |
getTranslation(out: vec3, mat: ReadonlyMat4): vec3 Returns the translation vector component of a transformation matrix. |
|
public |
getTranslation(out: vec3, a: ReadonlyQuat2): vec3 Gets the translation of a normalized dual quat |
|
public |
hermite(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, c: ReadonlyVec3, d: ReadonlyVec3, t: Number): vec3 Performs a hermite interpolation with two control points |
|
public |
identity(out: mat2): mat2 Set a mat2 to the identity matrix |
|
public |
identity(out: mat2d): mat2d Set a mat2d to the identity matrix |
|
public |
identity(out: mat3): mat3 Set a mat3 to the identity matrix |
|
public |
identity(out: mat4): mat4 Set a mat4 to the identity matrix |
|
public |
identity(out: quat): quat Set a quat to the identity quaternion |
|
public |
identity(out: quat2): quat2 Set a dual quat to the identity dual quaternion |
|
public |
inverse(out: vec2, a: ReadonlyVec2): vec2 Returns the inverse of the components of a vec2 |
|
public |
inverse(out: vec3, a: ReadonlyVec3): vec3 Returns the inverse of the components of a vec3 |
|
public |
inverse(out: vec4, a: ReadonlyVec4): vec4 Returns the inverse of the components of a vec4 |
|
public |
invert(out: mat2, a: ReadonlyMat2): mat2 Inverts a mat2 |
|
public |
invert(out: mat2d, a: ReadonlyMat2d): mat2d Inverts a mat2d |
|
public |
invert(out: mat3, a: ReadonlyMat3): mat3 Inverts a mat3 |
|
public |
invert(out: mat4, a: ReadonlyMat4): mat4 Inverts a mat4 |
|
public |
invert(out: quat, a: ReadonlyQuat): quat Calculates the inverse of a quat |
|
public |
invert(out: quat2, a: ReadonlyQuat2): quat2 Calculates the inverse of a dual quat. |
|
public |
Calculates the length of a vec2 |
|
public |
Calculates the length of a vec3 |
|
public |
Calculates the length of a vec4 |
|
public |
Performs a linear interpolation between two dual quats's NOTE: The resulting dual quaternions won't always be normalized (The error is most noticeable when t = 0.5) |
|
public |
Performs a linear interpolation between two vec2's |
|
public |
Performs a linear interpolation between two vec3's |
|
public |
Performs a linear interpolation between two vec4's |
|
public |
ln(out: quat, a: ReadonlyQuat): quat Calculate the natural logarithm of a unit quaternion. |
|
public |
lookAt(out: mat4, eye: ReadonlyVec3, center: ReadonlyVec3, up: ReadonlyVec3): mat4 Generates a look-at matrix with the given eye position, focal point, and up axis. |
|
public |
max(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 Returns the maximum of two vec2's |
|
public |
max(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 Returns the maximum of two vec3's |
|
public |
max(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 Returns the maximum of two vec4's |
|
public |
min(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 Returns the minimum of two vec2's |
|
public |
min(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 Returns the minimum of two vec3's |
|
public |
min(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 Returns the minimum of two vec4's |
|
public |
multiply(out: mat2, a: ReadonlyMat2, b: ReadonlyMat2): mat2 Multiplies two mat2's |
|
public |
multiply(out: mat2d, a: ReadonlyMat2d, b: ReadonlyMat2d): mat2d Multiplies two mat2d's |
|
public |
multiply(out: mat3, a: ReadonlyMat3, b: ReadonlyMat3): mat3 Multiplies two mat3's |
|
public |
multiply(out: mat4, a: ReadonlyMat4, b: ReadonlyMat4): mat4 Multiplies two mat4s |
|
public |
multiply(out: quat, a: ReadonlyQuat, b: ReadonlyQuat): quat Multiplies two quat's |
|
public |
multiply(out: quat2, a: ReadonlyQuat2, b: ReadonlyQuat2): quat2 Multiplies two dual quat's |
|
public |
multiply(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 Multiplies two vec2's |
|
public |
multiply(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 Multiplies two vec3's |
|
public |
multiply(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 Multiplies two vec4's |
|
public |
multiplyScalar(out: mat2, a: ReadonlyMat2, b: Number): mat2 Multiply each element of the matrix by a scalar. |
|
public |
multiplyScalar(out: mat2d, a: ReadonlyMat2d, b: Number): mat2d Multiply each element of the matrix by a scalar. |
|
public |
multiplyScalar(out: mat3, a: ReadonlyMat3, b: Number): mat3 Multiply each element of the matrix by a scalar. |
|
public |
multiplyScalar(out: mat4, a: ReadonlyMat4, b: Number): mat4 Multiply each element of the matrix by a scalar. |
|
public |
multiplyScalarAndAdd(out: mat2, a: ReadonlyMat2, b: ReadonlyMat2, scale: Number): mat2 Adds two mat2's after multiplying each element of the second operand by a scalar value. |
|
public |
multiplyScalarAndAdd(out: mat2d, a: ReadonlyMat2d, b: ReadonlyMat2d, scale: Number): mat2d Adds two mat2d's after multiplying each element of the second operand by a scalar value. |
|
public |
multiplyScalarAndAdd(out: mat3, a: ReadonlyMat3, b: ReadonlyMat3, scale: Number): mat3 Adds two mat3's after multiplying each element of the second operand by a scalar value. |
|
public |
multiplyScalarAndAdd(out: mat4, a: ReadonlyMat4, b: ReadonlyMat4, scale: Number): mat4 Adds two mat4's after multiplying each element of the second operand by a scalar value. |
|
public |
negate(out: vec2, a: ReadonlyVec2): vec2 Negates the components of a vec2 |
|
public |
negate(out: vec3, a: ReadonlyVec3): vec3 Negates the components of a vec3 |
|
public |
negate(out: vec4, a: ReadonlyVec4): vec4 Negates the components of a vec4 |
|
public |
normalFromMat4(out: mat3, a: ReadonlyMat4): mat3 Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix |
|
public |
normalize(out: quat2, a: ReadonlyQuat2): quat2 Normalize a dual quat |
|
public |
normalize(out: vec2, a: ReadonlyVec2): vec2 Normalize a vec2 |
|
public |
normalize(out: vec3, a: ReadonlyVec3): vec3 Normalize a vec3 |
|
public |
normalize(out: vec4, a: ReadonlyVec4): vec4 Normalize a vec4 |
|
public |
ortho(out: mat4, left: number, right: number, bottom: number, top: number, near: number, far: number): mat4 Generates a orthogonal projection matrix with the given bounds |
|
public |
perspective(out: mat4, fovy: number, aspect: number, near: number, far: number): mat4 Generates a perspective projection matrix with the given bounds. |
|
public |
perspectiveFromFieldOfView(out: mat4, fov: Object, near: number, far: number): mat4 Generates a perspective projection matrix with the given field of view. |
|
public |
Calculate the scalar power of a unit quaternion. |
|
public |
projection(out: mat3, width: number, height: number): mat3 Generates a 2D projection matrix with the given bounds |
|
public |
random(out: quat): quat Generates a random unit quaternion |
|
public |
Generates a random vector with the given scale |
|
public |
Generates a random vector with the given scale |
|
public |
Generates a random vector with the given scale |
|
public |
Rotates a mat2 by the given angle |
|
public |
Rotates a mat2d by the given angle |
|
public |
Rotates a mat3 by the given angle |
|
public |
Rotates a mat4 by the given angle around the given axis |
|
public |
Rotate a 2D vector |
|
public |
rotateAroundAxis(out: quat2, a: ReadonlyQuat2, axis: ReadonlyVec3, rad: Number): quat2 Rotates a dual quat around a given axis. |
|
public |
rotateByQuatAppend(out: quat2, a: ReadonlyQuat2, q: ReadonlyQuat): quat2 Rotates a dual quat by a given quaternion (a * q) |
|
public |
rotateByQuatPrepend(out: quat2, q: ReadonlyQuat, a: ReadonlyQuat2): quat2 Rotates a dual quat by a given quaternion (q * a) |
|
public |
Rotates a matrix by the given angle around the X axis |
|
public |
Rotates a quaternion by the given angle about the X axis |
|
public |
Rotates a dual quat around the X axis |
|
public |
Rotate a 3D vector around the x-axis |
|
public |
Rotates a matrix by the given angle around the Y axis |
|
public |
Rotates a quaternion by the given angle about the Y axis |
|
public |
Rotates a dual quat around the Y axis |
|
public |
Rotate a 3D vector around the y-axis |
|
public |
Rotates a matrix by the given angle around the Z axis |
|
public |
Rotates a quaternion by the given angle about the Z axis |
|
public |
Rotates a dual quat around the Z axis |
|
public |
Rotate a 3D vector around the z-axis |
|
public |
round(out: vec2, a: ReadonlyVec2): vec2 Math.round the components of a vec2 |
|
public |
round(out: vec3, a: ReadonlyVec3): vec3 Math.round the components of a vec3 |
|
public |
round(out: vec4, a: ReadonlyVec4): vec4 Math.round the components of a vec4 |
|
public |
scale(out: mat2, a: ReadonlyMat2, v: ReadonlyVec2): mat2 Scales the mat2 by the dimensions in the given vec2 |
|
public |
scale(out: mat2d, a: ReadonlyMat2d, v: ReadonlyVec2): mat2d Scales the mat2d by the dimensions in the given vec2 |
|
public |
scale(out: mat3, a: ReadonlyMat3, v: ReadonlyVec2): mat3 Scales the mat3 by the dimensions in the given vec2 |
|
public |
scale(out: mat4, a: ReadonlyMat4, v: ReadonlyVec3): mat4 Scales the mat4 by the dimensions in the given vec3 not using vectorization |
|
public |
Scales a dual quat by a scalar number |
|
public |
Scales a vec2 by a scalar number |
|
public |
Scales a vec3 by a scalar number |
|
public |
Scales a vec4 by a scalar number |
|
public |
scaleAndAdd(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2, scale: Number): vec2 Adds two vec2's after scaling the second operand by a scalar value |
|
public |
scaleAndAdd(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, scale: Number): vec3 Adds two vec3's after scaling the second operand by a scalar value |
|
public |
scaleAndAdd(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4, scale: Number): vec4 Adds two vec4's after scaling the second operand by a scalar value |
|
public |
Set the components of a mat2 to the given values |
|
public |
Set the components of a mat2d to the given values |
|
public |
set(out: mat3, m00: Number, m01: Number, m02: Number, m10: Number, m11: Number, m12: Number, m20: Number, m21: Number, m22: Number): mat3 Set the components of a mat3 to the given values |
|
public |
set(out: mat4, m00: Number, m01: Number, m02: Number, m03: Number, m10: Number, m11: Number, m12: Number, m13: Number, m20: Number, m21: Number, m22: Number, m23: Number, m30: Number, m31: Number, m32: Number, m33: Number): mat4 Set the components of a mat4 to the given values |
|
public |
set(out: quat2, x1: Number, y1: Number, z1: Number, w1: Number, x2: Number, y2: Number, z2: Number, w2: Number): quat2 Set the components of a dual quat to the given values |
|
public |
Set the components of a vec2 to the given values |
|
public |
Set the components of a vec3 to the given values |
|
public |
Set the components of a vec4 to the given values |
|
public |
setAxisAngle(out: quat, axis: ReadonlyVec3, rad: Number): quat Sets a quat from the given angle and rotation axis, then returns it. |
|
public |
setDual(out: quat2, q: ReadonlyQuat): quat2 Set the dual component of a dual quat to the given quaternion |
|
public |
setMatrixArrayType(type: Float32ArrayConstructor | ArrayConstructor) Sets the type of array used when creating new vectors and matrices |
|
public |
Performs a spherical linear interpolation between two quat |
|
public |
squaredDistance(a: ReadonlyVec2, b: ReadonlyVec2): Number Calculates the squared euclidian distance between two vec2's |
|
public |
squaredDistance(a: ReadonlyVec3, b: ReadonlyVec3): Number Calculates the squared euclidian distance between two vec3's |
|
public |
squaredDistance(a: ReadonlyVec4, b: ReadonlyVec4): Number Calculates the squared euclidian distance between two vec4's |
|
public |
squaredLength(a: ReadonlyVec2): Number Calculates the squared length of a vec2 |
|
public |
squaredLength(a: ReadonlyVec3): Number Calculates the squared length of a vec3 |
|
public |
squaredLength(a: ReadonlyVec4): Number Calculates the squared length of a vec4 |
|
public |
Returns a string representation of a mat2 |
|
public |
Returns a string representation of a mat2d |
|
public |
Returns a string representation of a mat3 |
|
public |
Returns a string representation of a mat4 |
|
public |
Returns a string representation of a quatenion |
|
public |
Returns a string representation of a dual quatenion |
|
public |
Returns a string representation of a vector |
|
public |
Returns a string representation of a vector |
|
public |
Returns a string representation of a vector |
|
public |
subtract(out: mat2, a: ReadonlyMat2, b: ReadonlyMat2): mat2 Subtracts matrix b from matrix a |
|
public |
subtract(out: mat2d, a: ReadonlyMat2d, b: ReadonlyMat2d): mat2d Subtracts matrix b from matrix a |
|
public |
subtract(out: mat3, a: ReadonlyMat3, b: ReadonlyMat3): mat3 Subtracts matrix b from matrix a |
|
public |
subtract(out: mat4, a: ReadonlyMat4, b: ReadonlyMat4): mat4 Subtracts matrix b from matrix a |
|
public |
subtract(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 Subtracts vector b from vector a |
|
public |
subtract(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 Subtracts vector b from vector a |
|
public |
subtract(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 Subtracts vector b from vector a |
|
public |
targetTo(out: mat4, eye: ReadonlyVec3, center: ReadonlyVec3, up: ReadonlyVec3): mat4 Generates a matrix that makes something look at something else. |
|
public |
Convert Degree To Radian |
|
public |
transformMat2(out: vec2, a: ReadonlyVec2, m: ReadonlyMat2): vec2 Transforms the vec2 with a mat2 |
|
public |
transformMat2d(out: vec2, a: ReadonlyVec2, m: ReadonlyMat2d): vec2 Transforms the vec2 with a mat2d |
|
public |
transformMat3(out: vec2, a: ReadonlyVec2, m: ReadonlyMat3): vec2 Transforms the vec2 with a mat3 3rd vector component is implicitly '1' |
|
public |
transformMat3(out: vec3, a: ReadonlyVec3, m: ReadonlyMat3): vec3 Transforms the vec3 with a mat3. |
|
public |
transformMat4(out: vec2, a: ReadonlyVec2, m: ReadonlyMat4): vec2 Transforms the vec2 with a mat4 3rd vector component is implicitly '0' 4th vector component is implicitly '1' |
|
public |
transformMat4(out: vec3, a: ReadonlyVec3, m: ReadonlyMat4): vec3 Transforms the vec3 with a mat4. |
|
public |
transformMat4(out: vec4, a: ReadonlyVec4, m: ReadonlyMat4): vec4 Transforms the vec4 with a mat4. |
|
public |
transformQuat(out: vec3, a: ReadonlyVec3, q: ReadonlyQuat): vec3 Transforms the vec3 with a quat Can also be used for dual quaternions. |
|
public |
transformQuat(out: vec4, a: ReadonlyVec4, q: ReadonlyQuat): vec4 Transforms the vec4 with a quat |
|
public |
translate(out: mat2d, a: ReadonlyMat2d, v: ReadonlyVec2): mat2d Translates the mat2d by the dimensions in the given vec2 |
|
public |
translate(out: mat3, a: ReadonlyMat3, v: ReadonlyVec2): mat3 Translate a mat3 by the given vector |
|
public |
translate(out: mat4, a: ReadonlyMat4, v: ReadonlyVec3): mat4 Translate a mat4 by the given vector |
|
public |
translate(out: quat2, a: ReadonlyQuat2, v: ReadonlyVec3): quat2 Translates a dual quat by the given vector |
|
public |
transpose(out: mat2, a: ReadonlyMat2): mat2 Transpose the values of a mat2 |
|
public |
transpose(out: mat3, a: ReadonlyMat3): mat3 Transpose the values of a mat3 |
|
public |
transpose(out: mat4, a: ReadonlyMat4): mat4 Transpose the values of a mat4 |
|
public |
zero(out: vec2): vec2 Set the components of a vec2 to zero |
|
public |
zero(out: vec3): vec3 Set the components of a vec3 to zero |
|
public |
zero(out: vec4): vec4 Set the components of a vec4 to zero |
Static Public
public LDU(L: ReadonlyMat2, D: ReadonlyMat2, U: ReadonlyMat2, a: ReadonlyMat2): undefined[] source
import {LDU} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix
Params:
Name | Type | Attribute | Description |
L | ReadonlyMat2 | the lower triangular matrix |
|
D | ReadonlyMat2 | the diagonal matrix |
|
U | ReadonlyMat2 | the upper triangular matrix |
|
a | ReadonlyMat2 | the input matrix to factorize |
public add(out: mat2, a: ReadonlyMat2, b: ReadonlyMat2): mat2 source
import {add} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Adds two mat2's
Params:
Name | Type | Attribute | Description |
out | mat2 | the receiving matrix |
|
a | ReadonlyMat2 | the first operand |
|
b | ReadonlyMat2 | the second operand |
Return:
mat2 | out |
public add(out: mat2d, a: ReadonlyMat2d, b: ReadonlyMat2d): mat2d source
import {add} from 'bimsurfer3/viewer/glmatrix/mat2d.js'
Adds two mat2d's
Params:
Name | Type | Attribute | Description |
out | mat2d | the receiving matrix |
|
a | ReadonlyMat2d | the first operand |
|
b | ReadonlyMat2d | the second operand |
Return:
mat2d | out |
public add(out: mat3, a: ReadonlyMat3, b: ReadonlyMat3): mat3 source
import {add} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Adds two mat3's
Params:
Name | Type | Attribute | Description |
out | mat3 | the receiving matrix |
|
a | ReadonlyMat3 | the first operand |
|
b | ReadonlyMat3 | the second operand |
Return:
mat3 | out |
public add(out: mat4, a: ReadonlyMat4, b: ReadonlyMat4): mat4 source
import {add} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Adds two mat4's
Params:
Name | Type | Attribute | Description |
out | mat4 | the receiving matrix |
|
a | ReadonlyMat4 | the first operand |
|
b | ReadonlyMat4 | the second operand |
Return:
mat4 | out |
public add(out: quat2, a: ReadonlyQuat2, b: ReadonlyQuat2): quat2 source
import {add} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Adds two dual quat's
Params:
Name | Type | Attribute | Description |
out | quat2 | the receiving dual quaternion |
|
a | ReadonlyQuat2 | the first operand |
|
b | ReadonlyQuat2 | the second operand |
Return:
quat2 | out |
public add(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 source
import {add} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Adds two vec2's
Params:
Name | Type | Attribute | Description |
out | vec2 | the receiving vector |
|
a | ReadonlyVec2 | the first operand |
|
b | ReadonlyVec2 | the second operand |
Return:
vec2 | out |
public add(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 source
import {add} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Adds two vec3's
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
a | ReadonlyVec3 | the first operand |
|
b | ReadonlyVec3 | the second operand |
Return:
vec3 | out |
public add(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 source
import {add} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Adds two vec4's
Params:
Name | Type | Attribute | Description |
out | vec4 | the receiving vector |
|
a | ReadonlyVec4 | the first operand |
|
b | ReadonlyVec4 | the second operand |
Return:
vec4 | out |
public adjoint(out: mat2, a: ReadonlyMat2): mat2 source
import {adjoint} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Calculates the adjugate of a mat2
Params:
Name | Type | Attribute | Description |
out | mat2 | the receiving matrix |
|
a | ReadonlyMat2 | the source matrix |
Return:
mat2 | out |
public adjoint(out: mat3, a: ReadonlyMat3): mat3 source
import {adjoint} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Calculates the adjugate of a mat3
Params:
Name | Type | Attribute | Description |
out | mat3 | the receiving matrix |
|
a | ReadonlyMat3 | the source matrix |
Return:
mat3 | out |
public adjoint(out: mat4, a: ReadonlyMat4): mat4 source
import {adjoint} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Calculates the adjugate of a mat4
Params:
Name | Type | Attribute | Description |
out | mat4 | the receiving matrix |
|
a | ReadonlyMat4 | the source matrix |
Return:
mat4 | out |
public angle(a: ReadonlyVec2, b: ReadonlyVec2): Number source
import {angle} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Get the angle between two 2D vectors
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec2 | The first operand |
|
b | ReadonlyVec2 | The second operand |
public angle(a: ReadonlyVec3, b: ReadonlyVec3): Number source
import {angle} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Get the angle between two 3D vectors
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec3 | The first operand |
|
b | ReadonlyVec3 | The second operand |
public bezier(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, c: ReadonlyVec3, d: ReadonlyVec3, t: Number): vec3 source
import {bezier} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Performs a bezier interpolation with two control points
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
a | ReadonlyVec3 | the first operand |
|
b | ReadonlyVec3 | the second operand |
|
c | ReadonlyVec3 | the third operand |
|
d | ReadonlyVec3 | the fourth operand |
|
t | Number | interpolation amount, in the range [0-1], between the two inputs |
Return:
vec3 | out |
public calculateW(out: quat, a: ReadonlyQuat): quat source
import {calculateW} from 'bimsurfer3/viewer/glmatrix/quat.js'
Calculates the W component of a quat from the X, Y, and Z components. Assumes that quaternion is 1 unit in length. Any existing W component will be ignored.
Params:
Name | Type | Attribute | Description |
out | quat | the receiving quaternion |
|
a | ReadonlyQuat | quat to calculate W component of |
Return:
quat | out |
public ceil(out: vec2, a: ReadonlyVec2): vec2 source
import {ceil} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Math.ceil the components of a vec2
Params:
Name | Type | Attribute | Description |
out | vec2 | the receiving vector |
|
a | ReadonlyVec2 | vector to ceil |
Return:
vec2 | out |
public ceil(out: vec3, a: ReadonlyVec3): vec3 source
import {ceil} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Math.ceil the components of a vec3
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
a | ReadonlyVec3 | vector to ceil |
Return:
vec3 | out |
public ceil(out: vec4, a: ReadonlyVec4): vec4 source
import {ceil} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Math.ceil the components of a vec4
Params:
Name | Type | Attribute | Description |
out | vec4 | the receiving vector |
|
a | ReadonlyVec4 | vector to ceil |
Return:
vec4 | out |
public clone(a: ReadonlyMat2): mat2 source
import {clone} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Creates a new mat2 initialized with values from an existing matrix
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat2 | matrix to clone |
Return:
mat2 | a new 2x2 matrix |
public clone(a: ReadonlyMat2d): mat2d source
import {clone} from 'bimsurfer3/viewer/glmatrix/mat2d.js'
Creates a new mat2d initialized with values from an existing matrix
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat2d | matrix to clone |
Return:
mat2d | a new 2x3 matrix |
public clone(a: ReadonlyMat3): mat3 source
import {clone} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Creates a new mat3 initialized with values from an existing matrix
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat3 | matrix to clone |
Return:
mat3 | a new 3x3 matrix |
public clone(a: ReadonlyMat4): mat4 source
import {clone} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Creates a new mat4 initialized with values from an existing matrix
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat4 | matrix to clone |
Return:
mat4 | a new 4x4 matrix |
public clone(a: ReadonlyQuat2): quat2 source
import {clone} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Creates a new quat initialized with values from an existing quaternion
Params:
Name | Type | Attribute | Description |
a | ReadonlyQuat2 | dual quaternion to clone |
Return:
quat2 | new dual quaternion |
public clone(a: ReadonlyVec2): vec2 source
import {clone} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Creates a new vec2 initialized with values from an existing vector
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec2 | vector to clone |
Return:
vec2 | a new 2D vector |
public clone(a: ReadonlyVec3): vec3 source
import {clone} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Creates a new vec3 initialized with values from an existing vector
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec3 | vector to clone |
Return:
vec3 | a new 3D vector |
public clone(a: ReadonlyVec4): vec4 source
import {clone} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Creates a new vec4 initialized with values from an existing vector
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec4 | vector to clone |
Return:
vec4 | a new 4D vector |
public conjugate(out: quat, a: ReadonlyQuat): quat source
import {conjugate} from 'bimsurfer3/viewer/glmatrix/quat.js'
Calculates the conjugate of a quat If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.
Params:
Name | Type | Attribute | Description |
out | quat | the receiving quaternion |
|
a | ReadonlyQuat | quat to calculate conjugate of |
Return:
quat | out |
public conjugate(out: quat2, a: ReadonlyQuat2): quat2 source
import {conjugate} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Calculates the conjugate of a dual quat If the dual quaternion is normalized, this function is faster than quat2.inverse and produces the same result.
Params:
Name | Type | Attribute | Description |
out | quat2 | the receiving quaternion |
|
a | ReadonlyQuat2 | quat to calculate conjugate of |
Return:
quat2 | out |
public copy(out: mat2, a: ReadonlyMat2): mat2 source
import {copy} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Copy the values from one mat2 to another
Params:
Name | Type | Attribute | Description |
out | mat2 | the receiving matrix |
|
a | ReadonlyMat2 | the source matrix |
Return:
mat2 | out |
public copy(out: mat2d, a: ReadonlyMat2d): mat2d source
import {copy} from 'bimsurfer3/viewer/glmatrix/mat2d.js'
Copy the values from one mat2d to another
Params:
Name | Type | Attribute | Description |
out | mat2d | the receiving matrix |
|
a | ReadonlyMat2d | the source matrix |
Return:
mat2d | out |
public copy(out: mat3, a: ReadonlyMat3): mat3 source
import {copy} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Copy the values from one mat3 to another
Params:
Name | Type | Attribute | Description |
out | mat3 | the receiving matrix |
|
a | ReadonlyMat3 | the source matrix |
Return:
mat3 | out |
public copy(out: mat4, a: ReadonlyMat4): mat4 source
import {copy} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Copy the values from one mat4 to another
Params:
Name | Type | Attribute | Description |
out | mat4 | the receiving matrix |
|
a | ReadonlyMat4 | the source matrix |
Return:
mat4 | out |
public copy(out: quat2, a: ReadonlyQuat2): quat2 source
import {copy} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Copy the values from one dual quat to another
Params:
Name | Type | Attribute | Description |
out | quat2 | the receiving dual quaternion |
|
a | ReadonlyQuat2 | the source dual quaternion |
Return:
quat2 | out |
public copy(out: vec2, a: ReadonlyVec2): vec2 source
import {copy} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Copy the values from one vec2 to another
Params:
Name | Type | Attribute | Description |
out | vec2 | the receiving vector |
|
a | ReadonlyVec2 | the source vector |
Return:
vec2 | out |
public copy(out: vec3, a: ReadonlyVec3): vec3 source
import {copy} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Copy the values from one vec3 to another
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
a | ReadonlyVec3 | the source vector |
Return:
vec3 | out |
public copy(out: vec4, a: ReadonlyVec4): vec4 source
import {copy} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Copy the values from one vec4 to another
Params:
Name | Type | Attribute | Description |
out | vec4 | the receiving vector |
|
a | ReadonlyVec4 | the source vector |
Return:
vec4 | out |
public create(): mat2 source
import {create} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Creates a new identity mat2
Return:
mat2 | a new 2x2 matrix |
public create(): mat2d source
import {create} from 'bimsurfer3/viewer/glmatrix/mat2d.js'
Creates a new identity mat2d
Return:
mat2d | a new 2x3 matrix |
public create(): mat3 source
import {create} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Creates a new identity mat3
Return:
mat3 | a new 3x3 matrix |
public create(): mat4 source
import {create} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Creates a new identity mat4
Return:
mat4 | a new 4x4 matrix |
public create(): quat source
import {create} from 'bimsurfer3/viewer/glmatrix/quat.js'
Creates a new identity quat
Return:
quat | a new quaternion |
public create(): quat2 source
import {create} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Creates a new identity dual quat
Return:
quat2 | a new dual quaternion [real -> rotation, dual -> translation] |
public create(): vec2 source
import {create} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Creates a new, empty vec2
Return:
vec2 | a new 2D vector |
public create(): vec3 source
import {create} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Creates a new, empty vec3
Return:
vec3 | a new 3D vector |
public create(): vec4 source
import {create} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Creates a new, empty vec4
Return:
vec4 | a new 4D vector |
public cross(out: vec3, a: ReadonlyVec2, b: ReadonlyVec2): vec3 source
import {cross} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Computes the cross product of two vec2's Note that the cross product must by definition produce a 3D vector
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
a | ReadonlyVec2 | the first operand |
|
b | ReadonlyVec2 | the second operand |
Return:
vec3 | out |
public cross(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 source
import {cross} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Computes the cross product of two vec3's
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
a | ReadonlyVec3 | the first operand |
|
b | ReadonlyVec3 | the second operand |
Return:
vec3 | out |
public cross(result: ReadonlyVec4, U: ReadonlyVec4, V: ReadonlyVec4, W: ReadonlyVec4): vec4 source
import {cross} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Returns the cross-product of three vectors in a 4-dimensional space
Params:
Name | Type | Attribute | Description |
result | ReadonlyVec4 | the receiving vector |
|
U | ReadonlyVec4 | the first vector |
|
V | ReadonlyVec4 | the second vector |
|
W | ReadonlyVec4 | the third vector |
Return:
vec4 | result |
public determinant(a: ReadonlyMat2): Number source
import {determinant} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Calculates the determinant of a mat2
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat2 | the source matrix |
public determinant(a: ReadonlyMat2d): Number source
import {determinant} from 'bimsurfer3/viewer/glmatrix/mat2d.js'
Calculates the determinant of a mat2d
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat2d | the source matrix |
public determinant(a: ReadonlyMat3): Number source
import {determinant} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Calculates the determinant of a mat3
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat3 | the source matrix |
public determinant(a: ReadonlyMat4): Number source
import {determinant} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Calculates the determinant of a mat4
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat4 | the source matrix |
public distance(a: ReadonlyVec2, b: ReadonlyVec2): Number source
import {distance} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Calculates the euclidian distance between two vec2's
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec2 | the first operand |
|
b | ReadonlyVec2 | the second operand |
public distance(a: ReadonlyVec3, b: ReadonlyVec3): Number source
import {distance} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Calculates the euclidian distance between two vec3's
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec3 | the first operand |
|
b | ReadonlyVec3 | the second operand |
public distance(a: ReadonlyVec4, b: ReadonlyVec4): Number source
import {distance} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Calculates the euclidian distance between two vec4's
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec4 | the first operand |
|
b | ReadonlyVec4 | the second operand |
public divide(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 source
import {divide} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Divides two vec2's
Params:
Name | Type | Attribute | Description |
out | vec2 | the receiving vector |
|
a | ReadonlyVec2 | the first operand |
|
b | ReadonlyVec2 | the second operand |
Return:
vec2 | out |
public divide(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 source
import {divide} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Divides two vec3's
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
a | ReadonlyVec3 | the first operand |
|
b | ReadonlyVec3 | the second operand |
Return:
vec3 | out |
public divide(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 source
import {divide} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Divides two vec4's
Params:
Name | Type | Attribute | Description |
out | vec4 | the receiving vector |
|
a | ReadonlyVec4 | the first operand |
|
b | ReadonlyVec4 | the second operand |
Return:
vec4 | out |
public dot(a: ReadonlyVec2, b: ReadonlyVec2): Number source
import {dot} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Calculates the dot product of two vec2's
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec2 | the first operand |
|
b | ReadonlyVec2 | the second operand |
public dot(a: ReadonlyVec3, b: ReadonlyVec3): Number source
import {dot} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Calculates the dot product of two vec3's
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec3 | the first operand |
|
b | ReadonlyVec3 | the second operand |
public dot(a: ReadonlyVec4, b: ReadonlyVec4): Number source
import {dot} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Calculates the dot product of two vec4's
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec4 | the first operand |
|
b | ReadonlyVec4 | the second operand |
public equals(a: Number, b: Number): Boolean source
import {equals} from 'bimsurfer3/viewer/glmatrix/common.js'
Tests whether or not the arguments have approximately the same value, within an absolute or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less than or equal to 1.0, and a relative tolerance is used for larger values)
public equals(a: ReadonlyMat2, b: ReadonlyMat2): Boolean source
import {equals} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Returns whether or not the matrices have approximately the same elements in the same position.
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat2 | The first matrix. |
|
b | ReadonlyMat2 | The second matrix. |
public equals(a: ReadonlyMat2d, b: ReadonlyMat2d): Boolean source
import {equals} from 'bimsurfer3/viewer/glmatrix/mat2d.js'
Returns whether or not the matrices have approximately the same elements in the same position.
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat2d | The first matrix. |
|
b | ReadonlyMat2d | The second matrix. |
public equals(a: ReadonlyMat3, b: ReadonlyMat3): Boolean source
import {equals} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Returns whether or not the matrices have approximately the same elements in the same position.
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat3 | The first matrix. |
|
b | ReadonlyMat3 | The second matrix. |
public equals(a: ReadonlyMat4, b: ReadonlyMat4): Boolean source
import {equals} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Returns whether or not the matrices have approximately the same elements in the same position.
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat4 | The first matrix. |
|
b | ReadonlyMat4 | The second matrix. |
public equals(a: ReadonlyQuat2, b: ReadonlyQuat2): Boolean source
import {equals} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Returns whether or not the dual quaternions have approximately the same elements in the same position.
Params:
Name | Type | Attribute | Description |
a | ReadonlyQuat2 | the first dual quat. |
|
b | ReadonlyQuat2 | the second dual quat. |
public equals(a: ReadonlyVec2, b: ReadonlyVec2): Boolean source
import {equals} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Returns whether or not the vectors have approximately the same elements in the same position.
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec2 | The first vector. |
|
b | ReadonlyVec2 | The second vector. |
public equals(a: ReadonlyVec3, b: ReadonlyVec3): Boolean source
import {equals} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Returns whether or not the vectors have approximately the same elements in the same position.
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec3 | The first vector. |
|
b | ReadonlyVec3 | The second vector. |
public equals(a: ReadonlyVec4, b: ReadonlyVec4): Boolean source
import {equals} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Returns whether or not the vectors have approximately the same elements in the same position.
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec4 | The first vector. |
|
b | ReadonlyVec4 | The second vector. |
public exactEquals(a: ReadonlyMat2, b: ReadonlyMat2): Boolean source
import {exactEquals} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat2 | The first matrix. |
|
b | ReadonlyMat2 | The second matrix. |
public exactEquals(a: ReadonlyMat2d, b: ReadonlyMat2d): Boolean source
import {exactEquals} from 'bimsurfer3/viewer/glmatrix/mat2d.js'
Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat2d | The first matrix. |
|
b | ReadonlyMat2d | The second matrix. |
public exactEquals(a: ReadonlyMat3, b: ReadonlyMat3): Boolean source
import {exactEquals} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat3 | The first matrix. |
|
b | ReadonlyMat3 | The second matrix. |
public exactEquals(a: ReadonlyMat4, b: ReadonlyMat4): Boolean source
import {exactEquals} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat4 | The first matrix. |
|
b | ReadonlyMat4 | The second matrix. |
public exactEquals(a: ReadonlyQuat2, b: ReadonlyQuat2): Boolean source
import {exactEquals} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Returns whether or not the dual quaternions have exactly the same elements in the same position (when compared with ===)
Params:
Name | Type | Attribute | Description |
a | ReadonlyQuat2 | the first dual quaternion. |
|
b | ReadonlyQuat2 | the second dual quaternion. |
public exactEquals(a: ReadonlyVec2, b: ReadonlyVec2): Boolean source
import {exactEquals} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===)
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec2 | The first vector. |
|
b | ReadonlyVec2 | The second vector. |
public exactEquals(a: ReadonlyVec3, b: ReadonlyVec3): Boolean source
import {exactEquals} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec3 | The first vector. |
|
b | ReadonlyVec3 | The second vector. |
public exactEquals(a: ReadonlyVec4, b: ReadonlyVec4): Boolean source
import {exactEquals} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec4 | The first vector. |
|
b | ReadonlyVec4 | The second vector. |
public exp(out: quat, a: ReadonlyQuat): quat source
import {exp} from 'bimsurfer3/viewer/glmatrix/quat.js'
Calculate the exponential of a unit quaternion.
Params:
Name | Type | Attribute | Description |
out | quat | the receiving quaternion |
|
a | ReadonlyQuat | quat to calculate the exponential of |
Return:
quat | out |
public floor(out: vec2, a: ReadonlyVec2): vec2 source
import {floor} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Math.floor the components of a vec2
Params:
Name | Type | Attribute | Description |
out | vec2 | the receiving vector |
|
a | ReadonlyVec2 | vector to floor |
Return:
vec2 | out |
public floor(out: vec3, a: ReadonlyVec3): vec3 source
import {floor} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Math.floor the components of a vec3
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
a | ReadonlyVec3 | vector to floor |
Return:
vec3 | out |
public floor(out: vec4, a: ReadonlyVec4): vec4 source
import {floor} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Math.floor the components of a vec4
Params:
Name | Type | Attribute | Description |
out | vec4 | the receiving vector |
|
a | ReadonlyVec4 | vector to floor |
Return:
vec4 | out |
public frob(a: ReadonlyMat2): Number source
import {frob} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Returns Frobenius norm of a mat2
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat2 | the matrix to calculate Frobenius norm of |
public frob(a: ReadonlyMat2d): Number source
import {frob} from 'bimsurfer3/viewer/glmatrix/mat2d.js'
Returns Frobenius norm of a mat2d
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat2d | the matrix to calculate Frobenius norm of |
public frob(a: ReadonlyMat3): Number source
import {frob} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Returns Frobenius norm of a mat3
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat3 | the matrix to calculate Frobenius norm of |
public frob(a: ReadonlyMat4): Number source
import {frob} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Returns Frobenius norm of a mat4
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat4 | the matrix to calculate Frobenius norm of |
public fromEuler(out: quat, Angle: x, Angle: y, Angle: z): quat source
import {fromEuler} from 'bimsurfer3/viewer/glmatrix/quat.js'
Creates a quaternion from the given euler angle x, y, z.
Params:
Name | Type | Attribute | Description |
out | quat | the receiving quaternion |
|
Angle | x | to rotate around X axis in degrees. |
|
Angle | y | to rotate around Y axis in degrees. |
|
Angle | z | to rotate around Z axis in degrees. |
Return:
quat | out |
public fromMat2d(out: mat3, a: ReadonlyMat2d): mat3 source
import {fromMat2d} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Copies the values from a mat2d into a mat3
Params:
Name | Type | Attribute | Description |
out | mat3 | the receiving matrix |
|
a | ReadonlyMat2d | the matrix to copy |
Return:
mat3 | out |
public fromMat3(out: quat, m: ReadonlyMat3): quat source
import {fromMat3} from 'bimsurfer3/viewer/glmatrix/quat.js'
Creates a quaternion from the given 3x3 rotation matrix.
NOTE: The resultant quaternion is not normalized, so you should be sure to renormalize the quaternion yourself where necessary.
Params:
Name | Type | Attribute | Description |
out | quat | the receiving quaternion |
|
m | ReadonlyMat3 | rotation matrix |
Return:
quat | out |
public fromMat4(out: mat3, a: ReadonlyMat4): mat3 source
import {fromMat4} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Copies the upper-left 3x3 values into the given mat3.
Params:
Name | Type | Attribute | Description |
out | mat3 | the receiving 3x3 matrix |
|
a | ReadonlyMat4 | the source 4x4 matrix |
Return:
mat3 | out |
public fromMat4(out: quat2, a: ReadonlyMat4): quat2 source
import {fromMat4} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Creates a new dual quat from a matrix (4x4)
Params:
Name | Type | Attribute | Description |
out | quat2 | the dual quaternion |
|
a | ReadonlyMat4 | the matrix |
Return:
quat2 | dual quat receiving operation result |
public fromQuat(out: mat3, q: ReadonlyQuat): mat3 source
import {fromQuat} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Calculates a 3x3 matrix from the given quaternion
Params:
Name | Type | Attribute | Description |
out | mat3 | mat3 receiving operation result |
|
q | ReadonlyQuat | Quaternion to create matrix from |
Return:
mat3 | out |
public fromQuat(out: mat4, q: ReadonlyQuat): mat4 source
import {fromQuat} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Calculates a 4x4 matrix from the given quaternion
Params:
Name | Type | Attribute | Description |
out | mat4 | mat4 receiving operation result |
|
q | ReadonlyQuat | Quaternion to create matrix from |
Return:
mat4 | out |
public fromQuat2(out: mat4, a: ReadonlyQuat2): mat4 source
import {fromQuat2} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Creates a new mat4 from a dual quat.
Params:
Name | Type | Attribute | Description |
out | mat4 | Matrix |
|
a | ReadonlyQuat2 | Dual Quaternion |
Return:
mat4 | mat4 receiving operation result |
public fromRotation(out: mat2, rad: Number): mat2 source
import {fromRotation} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Creates a matrix from a given angle This is equivalent to (but much faster than):
mat2.identity(dest);
mat2.rotate(dest, dest, rad);
Params:
Name | Type | Attribute | Description |
out | mat2 | mat2 receiving operation result |
|
rad | Number | the angle to rotate the matrix by |
Return:
mat2 | out |
public fromRotation(out: mat2d, rad: Number): mat2d source
import {fromRotation} from 'bimsurfer3/viewer/glmatrix/mat2d.js'
Creates a matrix from a given angle This is equivalent to (but much faster than):
mat2d.identity(dest);
mat2d.rotate(dest, dest, rad);
Params:
Name | Type | Attribute | Description |
out | mat2d | mat2d receiving operation result |
|
rad | Number | the angle to rotate the matrix by |
Return:
mat2d | out |
public fromRotation(out: mat3, rad: Number): mat3 source
import {fromRotation} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Creates a matrix from a given angle This is equivalent to (but much faster than):
mat3.identity(dest);
mat3.rotate(dest, dest, rad);
Params:
Name | Type | Attribute | Description |
out | mat3 | mat3 receiving operation result |
|
rad | Number | the angle to rotate the matrix by |
Return:
mat3 | out |
public fromRotation(out: mat4, rad: Number, axis: ReadonlyVec3): mat4 source
import {fromRotation} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Creates a matrix from a given angle around a given axis This is equivalent to (but much faster than):
mat4.identity(dest);
mat4.rotate(dest, dest, rad, axis);
Params:
Name | Type | Attribute | Description |
out | mat4 | mat4 receiving operation result |
|
rad | Number | the angle to rotate the matrix by |
|
axis | ReadonlyVec3 | the axis to rotate around |
Return:
mat4 | out |
public fromRotation(dual: ReadonlyQuat2, q: ReadonlyQuat): quat2 source
import {fromRotation} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Creates a dual quat from a quaternion
Params:
Name | Type | Attribute | Description |
dual | ReadonlyQuat2 | quaternion receiving operation result |
|
q | ReadonlyQuat | the quaternion |
Return:
quat2 | dual quaternion receiving operation result |
public fromRotationTranslation(out: mat4, q: quat4, v: ReadonlyVec3): mat4 source
import {fromRotationTranslation} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Creates a matrix from a quaternion rotation and vector translation This is equivalent to (but much faster than):
mat4.identity(dest);
mat4.translate(dest, vec);
let quatMat = mat4.create();
quat4.toMat4(quat, quatMat);
mat4.multiply(dest, quatMat);
Params:
Name | Type | Attribute | Description |
out | mat4 | mat4 receiving operation result |
|
q | quat4 | Rotation quaternion |
|
v | ReadonlyVec3 | Translation vector |
Return:
mat4 | out |
public fromRotationTranslation(dual: ReadonlyQuat2, q: ReadonlyQuat, t: ReadonlyVec3): quat2 source
import {fromRotationTranslation} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Creates a dual quat from a quaternion and a translation
Params:
Name | Type | Attribute | Description |
dual | ReadonlyQuat2 | quaternion receiving operation result |
|
q | ReadonlyQuat | a normalized quaternion |
|
t | ReadonlyVec3 | tranlation vector |
Return:
quat2 | dual quaternion receiving operation result |
public fromRotationTranslationScale(out: mat4, q: quat4, v: ReadonlyVec3, s: ReadonlyVec3): mat4 source
import {fromRotationTranslationScale} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Creates a matrix from a quaternion rotation, vector translation and vector scale This is equivalent to (but much faster than):
mat4.identity(dest);
mat4.translate(dest, vec);
let quatMat = mat4.create();
quat4.toMat4(quat, quatMat);
mat4.multiply(dest, quatMat);
mat4.scale(dest, scale)
Params:
Name | Type | Attribute | Description |
out | mat4 | mat4 receiving operation result |
|
q | quat4 | Rotation quaternion |
|
v | ReadonlyVec3 | Translation vector |
|
s | ReadonlyVec3 | Scaling vector |
Return:
mat4 | out |
public fromRotationTranslationScaleOrigin(out: mat4, q: quat4, v: ReadonlyVec3, s: ReadonlyVec3, o: ReadonlyVec3): mat4 source
import {fromRotationTranslationScaleOrigin} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin This is equivalent to (but much faster than):
mat4.identity(dest);
mat4.translate(dest, vec);
mat4.translate(dest, origin);
let quatMat = mat4.create();
quat4.toMat4(quat, quatMat);
mat4.multiply(dest, quatMat);
mat4.scale(dest, scale)
mat4.translate(dest, negativeOrigin);
Params:
Name | Type | Attribute | Description |
out | mat4 | mat4 receiving operation result |
|
q | quat4 | Rotation quaternion |
|
v | ReadonlyVec3 | Translation vector |
|
s | ReadonlyVec3 | Scaling vector |
|
o | ReadonlyVec3 | The origin vector around which to scale and rotate |
Return:
mat4 | out |
public fromRotationTranslationValues(x1: Number, y1: Number, z1: Number, w1: Number, x2: Number, y2: Number, z2: Number): quat2 source
import {fromRotationTranslationValues} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Creates a new dual quat from the given values (quat and translation)
Return:
quat2 | new dual quaternion |
public fromScaling(out: mat2, v: ReadonlyVec2): mat2 source
import {fromScaling} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Creates a matrix from a vector scaling This is equivalent to (but much faster than):
mat2.identity(dest);
mat2.scale(dest, dest, vec);
Params:
Name | Type | Attribute | Description |
out | mat2 | mat2 receiving operation result |
|
v | ReadonlyVec2 | Scaling vector |
Return:
mat2 | out |
public fromScaling(out: mat2d, v: ReadonlyVec2): mat2d source
import {fromScaling} from 'bimsurfer3/viewer/glmatrix/mat2d.js'
Creates a matrix from a vector scaling This is equivalent to (but much faster than):
mat2d.identity(dest);
mat2d.scale(dest, dest, vec);
Params:
Name | Type | Attribute | Description |
out | mat2d | mat2d receiving operation result |
|
v | ReadonlyVec2 | Scaling vector |
Return:
mat2d | out |
public fromScaling(out: mat3, v: ReadonlyVec2): mat3 source
import {fromScaling} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Creates a matrix from a vector scaling This is equivalent to (but much faster than):
mat3.identity(dest);
mat3.scale(dest, dest, vec);
Params:
Name | Type | Attribute | Description |
out | mat3 | mat3 receiving operation result |
|
v | ReadonlyVec2 | Scaling vector |
Return:
mat3 | out |
public fromScaling(out: mat4, v: ReadonlyVec3): mat4 source
import {fromScaling} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Creates a matrix from a vector scaling This is equivalent to (but much faster than):
mat4.identity(dest);
mat4.scale(dest, dest, vec);
Params:
Name | Type | Attribute | Description |
out | mat4 | mat4 receiving operation result |
|
v | ReadonlyVec3 | Scaling vector |
Return:
mat4 | out |
public fromTranslation(out: mat2d, v: ReadonlyVec2): mat2d source
import {fromTranslation} from 'bimsurfer3/viewer/glmatrix/mat2d.js'
Creates a matrix from a vector translation This is equivalent to (but much faster than):
mat2d.identity(dest);
mat2d.translate(dest, dest, vec);
Params:
Name | Type | Attribute | Description |
out | mat2d | mat2d receiving operation result |
|
v | ReadonlyVec2 | Translation vector |
Return:
mat2d | out |
public fromTranslation(out: mat3, v: ReadonlyVec2): mat3 source
import {fromTranslation} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Creates a matrix from a vector translation This is equivalent to (but much faster than):
mat3.identity(dest);
mat3.translate(dest, dest, vec);
Params:
Name | Type | Attribute | Description |
out | mat3 | mat3 receiving operation result |
|
v | ReadonlyVec2 | Translation vector |
Return:
mat3 | out |
public fromTranslation(out: mat4, v: ReadonlyVec3): mat4 source
import {fromTranslation} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Creates a matrix from a vector translation This is equivalent to (but much faster than):
mat4.identity(dest);
mat4.translate(dest, dest, vec);
Params:
Name | Type | Attribute | Description |
out | mat4 | mat4 receiving operation result |
|
v | ReadonlyVec3 | Translation vector |
Return:
mat4 | out |
public fromTranslation(dual: ReadonlyQuat2, t: ReadonlyVec3): quat2 source
import {fromTranslation} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Creates a dual quat from a translation
Params:
Name | Type | Attribute | Description |
dual | ReadonlyQuat2 | quaternion receiving operation result |
|
t | ReadonlyVec3 | translation vector |
Return:
quat2 | dual quaternion receiving operation result |
public fromValues(m00: Number, m01: Number, m10: Number, m11: Number): mat2 source
import {fromValues} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Create a new mat2 with the given values
Return:
mat2 | out A new 2x2 matrix |
public fromValues(a: Number, b: Number, c: Number, d: Number, tx: Number, ty: Number): mat2d source
import {fromValues} from 'bimsurfer3/viewer/glmatrix/mat2d.js'
Create a new mat2d with the given values
Return:
mat2d | A new mat2d |
public fromValues(m00: Number, m01: Number, m02: Number, m10: Number, m11: Number, m12: Number, m20: Number, m21: Number, m22: Number): mat3 source
import {fromValues} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Create a new mat3 with the given values
Params:
Name | Type | Attribute | Description |
m00 | Number | Component in column 0, row 0 position (index 0) |
|
m01 | Number | Component in column 0, row 1 position (index 1) |
|
m02 | Number | Component in column 0, row 2 position (index 2) |
|
m10 | Number | Component in column 1, row 0 position (index 3) |
|
m11 | Number | Component in column 1, row 1 position (index 4) |
|
m12 | Number | Component in column 1, row 2 position (index 5) |
|
m20 | Number | Component in column 2, row 0 position (index 6) |
|
m21 | Number | Component in column 2, row 1 position (index 7) |
|
m22 | Number | Component in column 2, row 2 position (index 8) |
Return:
mat3 | A new mat3 |
public fromValues(m00: Number, m01: Number, m02: Number, m03: Number, m10: Number, m11: Number, m12: Number, m13: Number, m20: Number, m21: Number, m22: Number, m23: Number, m30: Number, m31: Number, m32: Number, m33: Number): mat4 source
import {fromValues} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Create a new mat4 with the given values
Params:
Name | Type | Attribute | Description |
m00 | Number | Component in column 0, row 0 position (index 0) |
|
m01 | Number | Component in column 0, row 1 position (index 1) |
|
m02 | Number | Component in column 0, row 2 position (index 2) |
|
m03 | Number | Component in column 0, row 3 position (index 3) |
|
m10 | Number | Component in column 1, row 0 position (index 4) |
|
m11 | Number | Component in column 1, row 1 position (index 5) |
|
m12 | Number | Component in column 1, row 2 position (index 6) |
|
m13 | Number | Component in column 1, row 3 position (index 7) |
|
m20 | Number | Component in column 2, row 0 position (index 8) |
|
m21 | Number | Component in column 2, row 1 position (index 9) |
|
m22 | Number | Component in column 2, row 2 position (index 10) |
|
m23 | Number | Component in column 2, row 3 position (index 11) |
|
m30 | Number | Component in column 3, row 0 position (index 12) |
|
m31 | Number | Component in column 3, row 1 position (index 13) |
|
m32 | Number | Component in column 3, row 2 position (index 14) |
|
m33 | Number | Component in column 3, row 3 position (index 15) |
Return:
mat4 | A new mat4 |
public fromValues(x1: Number, y1: Number, z1: Number, w1: Number, x2: Number, y2: Number, z2: Number, w2: Number): quat2 source
import {fromValues} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Creates a new dual quat initialized with the given values
Return:
quat2 | new dual quaternion |
public fromValues(x: Number, y: Number): vec2 source
import {fromValues} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Creates a new vec2 initialized with the given values
Return:
vec2 | a new 2D vector |
public fromValues(x: Number, y: Number, z: Number): vec3 source
import {fromValues} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Creates a new vec3 initialized with the given values
Return:
vec3 | a new 3D vector |
public fromValues(x: Number, y: Number, z: Number, w: Number): vec4 source
import {fromValues} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Creates a new vec4 initialized with the given values
Return:
vec4 | a new 4D vector |
public fromXRotation(out: mat4, rad: Number): mat4 source
import {fromXRotation} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Creates a matrix from the given angle around the X axis This is equivalent to (but much faster than):
mat4.identity(dest);
mat4.rotateX(dest, dest, rad);
Params:
Name | Type | Attribute | Description |
out | mat4 | mat4 receiving operation result |
|
rad | Number | the angle to rotate the matrix by |
Return:
mat4 | out |
public fromYRotation(out: mat4, rad: Number): mat4 source
import {fromYRotation} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Creates a matrix from the given angle around the Y axis This is equivalent to (but much faster than):
mat4.identity(dest);
mat4.rotateY(dest, dest, rad);
Params:
Name | Type | Attribute | Description |
out | mat4 | mat4 receiving operation result |
|
rad | Number | the angle to rotate the matrix by |
Return:
mat4 | out |
public fromZRotation(out: mat4, rad: Number): mat4 source
import {fromZRotation} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Creates a matrix from the given angle around the Z axis This is equivalent to (but much faster than):
mat4.identity(dest);
mat4.rotateZ(dest, dest, rad);
Params:
Name | Type | Attribute | Description |
out | mat4 | mat4 receiving operation result |
|
rad | Number | the angle to rotate the matrix by |
Return:
mat4 | out |
public frustum(out: mat4, left: Number, right: Number, bottom: Number, top: Number, near: Number, far: Number): mat4 source
import {frustum} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Generates a frustum matrix with the given bounds
Params:
Name | Type | Attribute | Description |
out | mat4 | mat4 frustum matrix will be written into |
|
left | Number | Left bound of the frustum |
|
right | Number | Right bound of the frustum |
|
bottom | Number | Bottom bound of the frustum |
|
top | Number | Top bound of the frustum |
|
near | Number | Near bound of the frustum |
|
far | Number | Far bound of the frustum |
Return:
mat4 | out |
public getAngle(a: ReadonlyQuat, b: ReadonlyQuat): Number source
import {getAngle} from 'bimsurfer3/viewer/glmatrix/quat.js'
Gets the angular distance between two unit quaternions
Params:
Name | Type | Attribute | Description |
a | ReadonlyQuat | Origin unit quaternion |
|
b | ReadonlyQuat | Destination unit quaternion |
public getAxisAngle(out_axis: vec3, q: ReadonlyQuat): Number source
import {getAxisAngle} from 'bimsurfer3/viewer/glmatrix/quat.js'
Gets the rotation axis and angle for a given quaternion. If a quaternion is created with setAxisAngle, this method will return the same values as providied in the original parameter list OR functionally equivalent values. Example: The quaternion formed by axis [0, 0, 1] and angle -90 is the same as the quaternion formed by [0, 0, 1] and 270. This method favors the latter.
Params:
Name | Type | Attribute | Description |
out_axis | vec3 | Vector receiving the axis of rotation |
|
q | ReadonlyQuat | Quaternion to be decomposed |
public getDual(out: quat, a: ReadonlyQuat2): quat source
import {getDual} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Gets the dual part of a dual quat
Params:
Name | Type | Attribute | Description |
out | quat | dual part |
|
a | ReadonlyQuat2 | Dual Quaternion |
Return:
quat | dual part |
public getRotation(out: quat, mat: ReadonlyMat4): quat source
import {getRotation} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Returns a quaternion representing the rotational component of a transformation matrix. If a matrix is built with fromRotationTranslation, the returned quaternion will be the same as the quaternion originally supplied.
Params:
Name | Type | Attribute | Description |
out | quat | Quaternion to receive the rotation component |
|
mat | ReadonlyMat4 | Matrix to be decomposed (input) |
Return:
quat | out |
public getScaling(out: vec3, mat: ReadonlyMat4): vec3 source
import {getScaling} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Returns the scaling factor component of a transformation matrix. If a matrix is built with fromRotationTranslationScale with a normalized Quaternion paramter, the returned vector will be the same as the scaling vector originally supplied.
Params:
Name | Type | Attribute | Description |
out | vec3 | Vector to receive scaling factor component |
|
mat | ReadonlyMat4 | Matrix to be decomposed (input) |
Return:
vec3 | out |
public getTranslation(out: vec3, mat: ReadonlyMat4): vec3 source
import {getTranslation} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Returns the translation vector component of a transformation matrix. If a matrix is built with fromRotationTranslation, the returned vector will be the same as the translation vector originally supplied.
Params:
Name | Type | Attribute | Description |
out | vec3 | Vector to receive translation component |
|
mat | ReadonlyMat4 | Matrix to be decomposed (input) |
Return:
vec3 | out |
public getTranslation(out: vec3, a: ReadonlyQuat2): vec3 source
import {getTranslation} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Gets the translation of a normalized dual quat
Params:
Name | Type | Attribute | Description |
out | vec3 | translation |
|
a | ReadonlyQuat2 | Dual Quaternion to be decomposed |
Return:
vec3 | translation |
public hermite(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, c: ReadonlyVec3, d: ReadonlyVec3, t: Number): vec3 source
import {hermite} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Performs a hermite interpolation with two control points
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
a | ReadonlyVec3 | the first operand |
|
b | ReadonlyVec3 | the second operand |
|
c | ReadonlyVec3 | the third operand |
|
d | ReadonlyVec3 | the fourth operand |
|
t | Number | interpolation amount, in the range [0-1], between the two inputs |
Return:
vec3 | out |
public identity(out: mat2): mat2 source
import {identity} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Set a mat2 to the identity matrix
Params:
Name | Type | Attribute | Description |
out | mat2 | the receiving matrix |
Return:
mat2 | out |
public identity(out: mat2d): mat2d source
import {identity} from 'bimsurfer3/viewer/glmatrix/mat2d.js'
Set a mat2d to the identity matrix
Params:
Name | Type | Attribute | Description |
out | mat2d | the receiving matrix |
Return:
mat2d | out |
public identity(out: mat3): mat3 source
import {identity} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Set a mat3 to the identity matrix
Params:
Name | Type | Attribute | Description |
out | mat3 | the receiving matrix |
Return:
mat3 | out |
public identity(out: mat4): mat4 source
import {identity} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Set a mat4 to the identity matrix
Params:
Name | Type | Attribute | Description |
out | mat4 | the receiving matrix |
Return:
mat4 | out |
public identity(out: quat): quat source
import {identity} from 'bimsurfer3/viewer/glmatrix/quat.js'
Set a quat to the identity quaternion
Params:
Name | Type | Attribute | Description |
out | quat | the receiving quaternion |
Return:
quat | out |
public identity(out: quat2): quat2 source
import {identity} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Set a dual quat to the identity dual quaternion
Params:
Name | Type | Attribute | Description |
out | quat2 | the receiving quaternion |
Return:
quat2 | out |
public inverse(out: vec2, a: ReadonlyVec2): vec2 source
import {inverse} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Returns the inverse of the components of a vec2
Params:
Name | Type | Attribute | Description |
out | vec2 | the receiving vector |
|
a | ReadonlyVec2 | vector to invert |
Return:
vec2 | out |
public inverse(out: vec3, a: ReadonlyVec3): vec3 source
import {inverse} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Returns the inverse of the components of a vec3
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
a | ReadonlyVec3 | vector to invert |
Return:
vec3 | out |
public inverse(out: vec4, a: ReadonlyVec4): vec4 source
import {inverse} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Returns the inverse of the components of a vec4
Params:
Name | Type | Attribute | Description |
out | vec4 | the receiving vector |
|
a | ReadonlyVec4 | vector to invert |
Return:
vec4 | out |
public invert(out: mat2, a: ReadonlyMat2): mat2 source
import {invert} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Inverts a mat2
Params:
Name | Type | Attribute | Description |
out | mat2 | the receiving matrix |
|
a | ReadonlyMat2 | the source matrix |
Return:
mat2 | out |
public invert(out: mat2d, a: ReadonlyMat2d): mat2d source
import {invert} from 'bimsurfer3/viewer/glmatrix/mat2d.js'
Inverts a mat2d
Params:
Name | Type | Attribute | Description |
out | mat2d | the receiving matrix |
|
a | ReadonlyMat2d | the source matrix |
Return:
mat2d | out |
public invert(out: mat3, a: ReadonlyMat3): mat3 source
import {invert} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Inverts a mat3
Params:
Name | Type | Attribute | Description |
out | mat3 | the receiving matrix |
|
a | ReadonlyMat3 | the source matrix |
Return:
mat3 | out |
public invert(out: mat4, a: ReadonlyMat4): mat4 source
import {invert} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Inverts a mat4
Params:
Name | Type | Attribute | Description |
out | mat4 | the receiving matrix |
|
a | ReadonlyMat4 | the source matrix |
Return:
mat4 | out |
public invert(out: quat, a: ReadonlyQuat): quat source
import {invert} from 'bimsurfer3/viewer/glmatrix/quat.js'
Calculates the inverse of a quat
Params:
Name | Type | Attribute | Description |
out | quat | the receiving quaternion |
|
a | ReadonlyQuat | quat to calculate inverse of |
Return:
quat | out |
public invert(out: quat2, a: ReadonlyQuat2): quat2 source
import {invert} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Calculates the inverse of a dual quat. If they are normalized, conjugate is cheaper
Params:
Name | Type | Attribute | Description |
out | quat2 | the receiving dual quaternion |
|
a | ReadonlyQuat2 | dual quat to calculate inverse of |
Return:
quat2 | out |
public length(a: ReadonlyVec2): Number source
import {length} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Calculates the length of a vec2
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec2 | vector to calculate length of |
public length(a: ReadonlyVec3): Number source
import {length} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Calculates the length of a vec3
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec3 | vector to calculate length of |
public length(a: ReadonlyVec4): Number source
import {length} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Calculates the length of a vec4
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec4 | vector to calculate length of |
public lerp(out: quat2, a: ReadonlyQuat2, b: ReadonlyQuat2, t: Number): quat2 source
import {lerp} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Performs a linear interpolation between two dual quats's NOTE: The resulting dual quaternions won't always be normalized (The error is most noticeable when t = 0.5)
Params:
Name | Type | Attribute | Description |
out | quat2 | the receiving dual quat |
|
a | ReadonlyQuat2 | the first operand |
|
b | ReadonlyQuat2 | the second operand |
|
t | Number | interpolation amount, in the range [0-1], between the two inputs |
Return:
quat2 | out |
public lerp(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2, t: Number): vec2 source
import {lerp} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Performs a linear interpolation between two vec2's
Params:
Name | Type | Attribute | Description |
out | vec2 | the receiving vector |
|
a | ReadonlyVec2 | the first operand |
|
b | ReadonlyVec2 | the second operand |
|
t | Number | interpolation amount, in the range [0-1], between the two inputs |
Return:
vec2 | out |
public lerp(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, t: Number): vec3 source
import {lerp} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Performs a linear interpolation between two vec3's
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
a | ReadonlyVec3 | the first operand |
|
b | ReadonlyVec3 | the second operand |
|
t | Number | interpolation amount, in the range [0-1], between the two inputs |
Return:
vec3 | out |
public lerp(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4, t: Number): vec4 source
import {lerp} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Performs a linear interpolation between two vec4's
Params:
Name | Type | Attribute | Description |
out | vec4 | the receiving vector |
|
a | ReadonlyVec4 | the first operand |
|
b | ReadonlyVec4 | the second operand |
|
t | Number | interpolation amount, in the range [0-1], between the two inputs |
Return:
vec4 | out |
public ln(out: quat, a: ReadonlyQuat): quat source
import {ln} from 'bimsurfer3/viewer/glmatrix/quat.js'
Calculate the natural logarithm of a unit quaternion.
Params:
Name | Type | Attribute | Description |
out | quat | the receiving quaternion |
|
a | ReadonlyQuat | quat to calculate the exponential of |
Return:
quat | out |
public lookAt(out: mat4, eye: ReadonlyVec3, center: ReadonlyVec3, up: ReadonlyVec3): mat4 source
import {lookAt} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Generates a look-at matrix with the given eye position, focal point, and up axis. If you want a matrix that actually makes an object look at another object, you should use targetTo instead.
Params:
Name | Type | Attribute | Description |
out | mat4 | mat4 frustum matrix will be written into |
|
eye | ReadonlyVec3 | Position of the viewer |
|
center | ReadonlyVec3 | Point the viewer is looking at |
|
up | ReadonlyVec3 | vec3 pointing up |
Return:
mat4 | out |
public max(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 source
import {max} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Returns the maximum of two vec2's
Params:
Name | Type | Attribute | Description |
out | vec2 | the receiving vector |
|
a | ReadonlyVec2 | the first operand |
|
b | ReadonlyVec2 | the second operand |
Return:
vec2 | out |
public max(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 source
import {max} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Returns the maximum of two vec3's
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
a | ReadonlyVec3 | the first operand |
|
b | ReadonlyVec3 | the second operand |
Return:
vec3 | out |
public max(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 source
import {max} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Returns the maximum of two vec4's
Params:
Name | Type | Attribute | Description |
out | vec4 | the receiving vector |
|
a | ReadonlyVec4 | the first operand |
|
b | ReadonlyVec4 | the second operand |
Return:
vec4 | out |
public min(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 source
import {min} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Returns the minimum of two vec2's
Params:
Name | Type | Attribute | Description |
out | vec2 | the receiving vector |
|
a | ReadonlyVec2 | the first operand |
|
b | ReadonlyVec2 | the second operand |
Return:
vec2 | out |
public min(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 source
import {min} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Returns the minimum of two vec3's
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
a | ReadonlyVec3 | the first operand |
|
b | ReadonlyVec3 | the second operand |
Return:
vec3 | out |
public min(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 source
import {min} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Returns the minimum of two vec4's
Params:
Name | Type | Attribute | Description |
out | vec4 | the receiving vector |
|
a | ReadonlyVec4 | the first operand |
|
b | ReadonlyVec4 | the second operand |
Return:
vec4 | out |
public multiply(out: mat2, a: ReadonlyMat2, b: ReadonlyMat2): mat2 source
import {multiply} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Multiplies two mat2's
Params:
Name | Type | Attribute | Description |
out | mat2 | the receiving matrix |
|
a | ReadonlyMat2 | the first operand |
|
b | ReadonlyMat2 | the second operand |
Return:
mat2 | out |
public multiply(out: mat2d, a: ReadonlyMat2d, b: ReadonlyMat2d): mat2d source
import {multiply} from 'bimsurfer3/viewer/glmatrix/mat2d.js'
Multiplies two mat2d's
Params:
Name | Type | Attribute | Description |
out | mat2d | the receiving matrix |
|
a | ReadonlyMat2d | the first operand |
|
b | ReadonlyMat2d | the second operand |
Return:
mat2d | out |
public multiply(out: mat3, a: ReadonlyMat3, b: ReadonlyMat3): mat3 source
import {multiply} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Multiplies two mat3's
Params:
Name | Type | Attribute | Description |
out | mat3 | the receiving matrix |
|
a | ReadonlyMat3 | the first operand |
|
b | ReadonlyMat3 | the second operand |
Return:
mat3 | out |
public multiply(out: mat4, a: ReadonlyMat4, b: ReadonlyMat4): mat4 source
import {multiply} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Multiplies two mat4s
Params:
Name | Type | Attribute | Description |
out | mat4 | the receiving matrix |
|
a | ReadonlyMat4 | the first operand |
|
b | ReadonlyMat4 | the second operand |
Return:
mat4 | out |
public multiply(out: quat, a: ReadonlyQuat, b: ReadonlyQuat): quat source
import {multiply} from 'bimsurfer3/viewer/glmatrix/quat.js'
Multiplies two quat's
Params:
Name | Type | Attribute | Description |
out | quat | the receiving quaternion |
|
a | ReadonlyQuat | the first operand |
|
b | ReadonlyQuat | the second operand |
Return:
quat | out |
public multiply(out: quat2, a: ReadonlyQuat2, b: ReadonlyQuat2): quat2 source
import {multiply} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Multiplies two dual quat's
Params:
Name | Type | Attribute | Description |
out | quat2 | the receiving dual quaternion |
|
a | ReadonlyQuat2 | the first operand |
|
b | ReadonlyQuat2 | the second operand |
Return:
quat2 | out |
public multiply(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 source
import {multiply} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Multiplies two vec2's
Params:
Name | Type | Attribute | Description |
out | vec2 | the receiving vector |
|
a | ReadonlyVec2 | the first operand |
|
b | ReadonlyVec2 | the second operand |
Return:
vec2 | out |
public multiply(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 source
import {multiply} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Multiplies two vec3's
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
a | ReadonlyVec3 | the first operand |
|
b | ReadonlyVec3 | the second operand |
Return:
vec3 | out |
public multiply(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 source
import {multiply} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Multiplies two vec4's
Params:
Name | Type | Attribute | Description |
out | vec4 | the receiving vector |
|
a | ReadonlyVec4 | the first operand |
|
b | ReadonlyVec4 | the second operand |
Return:
vec4 | out |
public multiplyScalar(out: mat2, a: ReadonlyMat2, b: Number): mat2 source
import {multiplyScalar} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Multiply each element of the matrix by a scalar.
Params:
Name | Type | Attribute | Description |
out | mat2 | the receiving matrix |
|
a | ReadonlyMat2 | the matrix to scale |
|
b | Number | amount to scale the matrix's elements by |
Return:
mat2 | out |
public multiplyScalar(out: mat2d, a: ReadonlyMat2d, b: Number): mat2d source
import {multiplyScalar} from 'bimsurfer3/viewer/glmatrix/mat2d.js'
Multiply each element of the matrix by a scalar.
Params:
Name | Type | Attribute | Description |
out | mat2d | the receiving matrix |
|
a | ReadonlyMat2d | the matrix to scale |
|
b | Number | amount to scale the matrix's elements by |
Return:
mat2d | out |
public multiplyScalar(out: mat3, a: ReadonlyMat3, b: Number): mat3 source
import {multiplyScalar} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Multiply each element of the matrix by a scalar.
Params:
Name | Type | Attribute | Description |
out | mat3 | the receiving matrix |
|
a | ReadonlyMat3 | the matrix to scale |
|
b | Number | amount to scale the matrix's elements by |
Return:
mat3 | out |
public multiplyScalar(out: mat4, a: ReadonlyMat4, b: Number): mat4 source
import {multiplyScalar} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Multiply each element of the matrix by a scalar.
Params:
Name | Type | Attribute | Description |
out | mat4 | the receiving matrix |
|
a | ReadonlyMat4 | the matrix to scale |
|
b | Number | amount to scale the matrix's elements by |
Return:
mat4 | out |
public multiplyScalarAndAdd(out: mat2, a: ReadonlyMat2, b: ReadonlyMat2, scale: Number): mat2 source
import {multiplyScalarAndAdd} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Adds two mat2's after multiplying each element of the second operand by a scalar value.
Params:
Name | Type | Attribute | Description |
out | mat2 | the receiving vector |
|
a | ReadonlyMat2 | the first operand |
|
b | ReadonlyMat2 | the second operand |
|
scale | Number | the amount to scale b's elements by before adding |
Return:
mat2 | out |
public multiplyScalarAndAdd(out: mat2d, a: ReadonlyMat2d, b: ReadonlyMat2d, scale: Number): mat2d source
import {multiplyScalarAndAdd} from 'bimsurfer3/viewer/glmatrix/mat2d.js'
Adds two mat2d's after multiplying each element of the second operand by a scalar value.
Params:
Name | Type | Attribute | Description |
out | mat2d | the receiving vector |
|
a | ReadonlyMat2d | the first operand |
|
b | ReadonlyMat2d | the second operand |
|
scale | Number | the amount to scale b's elements by before adding |
Return:
mat2d | out |
public multiplyScalarAndAdd(out: mat3, a: ReadonlyMat3, b: ReadonlyMat3, scale: Number): mat3 source
import {multiplyScalarAndAdd} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Adds two mat3's after multiplying each element of the second operand by a scalar value.
Params:
Name | Type | Attribute | Description |
out | mat3 | the receiving vector |
|
a | ReadonlyMat3 | the first operand |
|
b | ReadonlyMat3 | the second operand |
|
scale | Number | the amount to scale b's elements by before adding |
Return:
mat3 | out |
public multiplyScalarAndAdd(out: mat4, a: ReadonlyMat4, b: ReadonlyMat4, scale: Number): mat4 source
import {multiplyScalarAndAdd} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Adds two mat4's after multiplying each element of the second operand by a scalar value.
Params:
Name | Type | Attribute | Description |
out | mat4 | the receiving vector |
|
a | ReadonlyMat4 | the first operand |
|
b | ReadonlyMat4 | the second operand |
|
scale | Number | the amount to scale b's elements by before adding |
Return:
mat4 | out |
public negate(out: vec2, a: ReadonlyVec2): vec2 source
import {negate} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Negates the components of a vec2
Params:
Name | Type | Attribute | Description |
out | vec2 | the receiving vector |
|
a | ReadonlyVec2 | vector to negate |
Return:
vec2 | out |
public negate(out: vec3, a: ReadonlyVec3): vec3 source
import {negate} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Negates the components of a vec3
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
a | ReadonlyVec3 | vector to negate |
Return:
vec3 | out |
public negate(out: vec4, a: ReadonlyVec4): vec4 source
import {negate} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Negates the components of a vec4
Params:
Name | Type | Attribute | Description |
out | vec4 | the receiving vector |
|
a | ReadonlyVec4 | vector to negate |
Return:
vec4 | out |
public normalFromMat4(out: mat3, a: ReadonlyMat4): mat3 source
import {normalFromMat4} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix
Params:
Name | Type | Attribute | Description |
out | mat3 | mat3 receiving operation result |
|
a | ReadonlyMat4 | Mat4 to derive the normal matrix from |
Return:
mat3 | out |
public normalize(out: quat2, a: ReadonlyQuat2): quat2 source
import {normalize} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Normalize a dual quat
Params:
Name | Type | Attribute | Description |
out | quat2 | the receiving dual quaternion |
|
a | ReadonlyQuat2 | dual quaternion to normalize |
Return:
quat2 | out |
public normalize(out: vec2, a: ReadonlyVec2): vec2 source
import {normalize} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Normalize a vec2
Params:
Name | Type | Attribute | Description |
out | vec2 | the receiving vector |
|
a | ReadonlyVec2 | vector to normalize |
Return:
vec2 | out |
public normalize(out: vec3, a: ReadonlyVec3): vec3 source
import {normalize} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Normalize a vec3
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
a | ReadonlyVec3 | vector to normalize |
Return:
vec3 | out |
public normalize(out: vec4, a: ReadonlyVec4): vec4 source
import {normalize} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Normalize a vec4
Params:
Name | Type | Attribute | Description |
out | vec4 | the receiving vector |
|
a | ReadonlyVec4 | vector to normalize |
Return:
vec4 | out |
public ortho(out: mat4, left: number, right: number, bottom: number, top: number, near: number, far: number): mat4 source
import {ortho} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Generates a orthogonal projection matrix with the given bounds
Params:
Name | Type | Attribute | Description |
out | mat4 | mat4 frustum matrix will be written into |
|
left | number | Left bound of the frustum |
|
right | number | Right bound of the frustum |
|
bottom | number | Bottom bound of the frustum |
|
top | number | Top bound of the frustum |
|
near | number | Near bound of the frustum |
|
far | number | Far bound of the frustum |
Return:
mat4 | out |
public perspective(out: mat4, fovy: number, aspect: number, near: number, far: number): mat4 source
import {perspective} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Generates a perspective projection matrix with the given bounds. Passing null/undefined/no value for far will generate infinite projection matrix.
Return:
mat4 | out |
public perspectiveFromFieldOfView(out: mat4, fov: Object, near: number, far: number): mat4 source
import {perspectiveFromFieldOfView} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Generates a perspective projection matrix with the given field of view. This is primarily useful for generating projection matrices to be used with the still experiemental WebVR API.
Return:
mat4 | out |
public pow(out: quat, a: ReadonlyQuat, b: Number): quat source
import {pow} from 'bimsurfer3/viewer/glmatrix/quat.js'
Calculate the scalar power of a unit quaternion.
Params:
Name | Type | Attribute | Description |
out | quat | the receiving quaternion |
|
a | ReadonlyQuat | quat to calculate the exponential of |
|
b | Number | amount to scale the quaternion by |
Return:
quat | out |
public projection(out: mat3, width: number, height: number): mat3 source
import {projection} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Generates a 2D projection matrix with the given bounds
Return:
mat3 | out |
public random(out: quat): quat source
import {random} from 'bimsurfer3/viewer/glmatrix/quat.js'
Generates a random unit quaternion
Params:
Name | Type | Attribute | Description |
out | quat | the receiving quaternion |
Return:
quat | out |
public random(out: vec2, scale: Number): vec2 source
import {random} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Generates a random vector with the given scale
Params:
Name | Type | Attribute | Description |
out | vec2 | the receiving vector |
|
scale | Number |
|
Length of the resulting vector. If ommitted, a unit vector will be returned |
Return:
vec2 | out |
public random(out: vec3, scale: Number): vec3 source
import {random} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Generates a random vector with the given scale
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
scale | Number |
|
Length of the resulting vector. If ommitted, a unit vector will be returned |
Return:
vec3 | out |
public random(out: vec4, scale: Number): vec4 source
import {random} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Generates a random vector with the given scale
Params:
Name | Type | Attribute | Description |
out | vec4 | the receiving vector |
|
scale | Number |
|
Length of the resulting vector. If ommitted, a unit vector will be returned |
Return:
vec4 | out |
public rotate(out: mat2, a: ReadonlyMat2, rad: Number): mat2 source
import {rotate} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Rotates a mat2 by the given angle
Params:
Name | Type | Attribute | Description |
out | mat2 | the receiving matrix |
|
a | ReadonlyMat2 | the matrix to rotate |
|
rad | Number | the angle to rotate the matrix by |
Return:
mat2 | out |
public rotate(out: mat2d, a: ReadonlyMat2d, rad: Number): mat2d source
import {rotate} from 'bimsurfer3/viewer/glmatrix/mat2d.js'
Rotates a mat2d by the given angle
Params:
Name | Type | Attribute | Description |
out | mat2d | the receiving matrix |
|
a | ReadonlyMat2d | the matrix to rotate |
|
rad | Number | the angle to rotate the matrix by |
Return:
mat2d | out |
public rotate(out: mat3, a: ReadonlyMat3, rad: Number): mat3 source
import {rotate} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Rotates a mat3 by the given angle
Params:
Name | Type | Attribute | Description |
out | mat3 | the receiving matrix |
|
a | ReadonlyMat3 | the matrix to rotate |
|
rad | Number | the angle to rotate the matrix by |
Return:
mat3 | out |
public rotate(out: mat4, a: ReadonlyMat4, rad: Number, axis: ReadonlyVec3): mat4 source
import {rotate} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Rotates a mat4 by the given angle around the given axis
Params:
Name | Type | Attribute | Description |
out | mat4 | the receiving matrix |
|
a | ReadonlyMat4 | the matrix to rotate |
|
rad | Number | the angle to rotate the matrix by |
|
axis | ReadonlyVec3 | the axis to rotate around |
Return:
mat4 | out |
public rotate(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2, rad: Number): vec2 source
import {rotate} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Rotate a 2D vector
Params:
Name | Type | Attribute | Description |
out | vec2 | The receiving vec2 |
|
a | ReadonlyVec2 | The vec2 point to rotate |
|
b | ReadonlyVec2 | The origin of the rotation |
|
rad | Number | The angle of rotation in radians |
Return:
vec2 | out |
public rotateAroundAxis(out: quat2, a: ReadonlyQuat2, axis: ReadonlyVec3, rad: Number): quat2 source
import {rotateAroundAxis} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Rotates a dual quat around a given axis. Does the normalisation automatically
Params:
Name | Type | Attribute | Description |
out | quat2 | the receiving dual quaternion |
|
a | ReadonlyQuat2 | the dual quaternion to rotate |
|
axis | ReadonlyVec3 | the axis to rotate around |
|
rad | Number | how far the rotation should be |
Return:
quat2 | out |
public rotateByQuatAppend(out: quat2, a: ReadonlyQuat2, q: ReadonlyQuat): quat2 source
import {rotateByQuatAppend} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Rotates a dual quat by a given quaternion (a * q)
Params:
Name | Type | Attribute | Description |
out | quat2 | the receiving dual quaternion |
|
a | ReadonlyQuat2 | the dual quaternion to rotate |
|
q | ReadonlyQuat | quaternion to rotate by |
Return:
quat2 | out |
public rotateByQuatPrepend(out: quat2, q: ReadonlyQuat, a: ReadonlyQuat2): quat2 source
import {rotateByQuatPrepend} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Rotates a dual quat by a given quaternion (q * a)
Params:
Name | Type | Attribute | Description |
out | quat2 | the receiving dual quaternion |
|
q | ReadonlyQuat | quaternion to rotate by |
|
a | ReadonlyQuat2 | the dual quaternion to rotate |
Return:
quat2 | out |
public rotateX(out: mat4, a: ReadonlyMat4, rad: Number): mat4 source
import {rotateX} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Rotates a matrix by the given angle around the X axis
Params:
Name | Type | Attribute | Description |
out | mat4 | the receiving matrix |
|
a | ReadonlyMat4 | the matrix to rotate |
|
rad | Number | the angle to rotate the matrix by |
Return:
mat4 | out |
public rotateX(out: quat, a: ReadonlyQuat, rad: number): quat source
import {rotateX} from 'bimsurfer3/viewer/glmatrix/quat.js'
Rotates a quaternion by the given angle about the X axis
Params:
Name | Type | Attribute | Description |
out | quat | quat receiving operation result |
|
a | ReadonlyQuat | quat to rotate |
|
rad | number | angle (in radians) to rotate |
Return:
quat | out |
public rotateX(out: quat2, a: ReadonlyQuat2, rad: number): quat2 source
import {rotateX} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Rotates a dual quat around the X axis
Params:
Name | Type | Attribute | Description |
out | quat2 | the receiving dual quaternion |
|
a | ReadonlyQuat2 | the dual quaternion to rotate |
|
rad | number | how far should the rotation be |
Return:
quat2 | out |
public rotateX(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, rad: Number): vec3 source
import {rotateX} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Rotate a 3D vector around the x-axis
Params:
Name | Type | Attribute | Description |
out | vec3 | The receiving vec3 |
|
a | ReadonlyVec3 | The vec3 point to rotate |
|
b | ReadonlyVec3 | The origin of the rotation |
|
rad | Number | The angle of rotation in radians |
Return:
vec3 | out |
public rotateY(out: mat4, a: ReadonlyMat4, rad: Number): mat4 source
import {rotateY} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Rotates a matrix by the given angle around the Y axis
Params:
Name | Type | Attribute | Description |
out | mat4 | the receiving matrix |
|
a | ReadonlyMat4 | the matrix to rotate |
|
rad | Number | the angle to rotate the matrix by |
Return:
mat4 | out |
public rotateY(out: quat, a: ReadonlyQuat, rad: number): quat source
import {rotateY} from 'bimsurfer3/viewer/glmatrix/quat.js'
Rotates a quaternion by the given angle about the Y axis
Params:
Name | Type | Attribute | Description |
out | quat | quat receiving operation result |
|
a | ReadonlyQuat | quat to rotate |
|
rad | number | angle (in radians) to rotate |
Return:
quat | out |
public rotateY(out: quat2, a: ReadonlyQuat2, rad: number): quat2 source
import {rotateY} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Rotates a dual quat around the Y axis
Params:
Name | Type | Attribute | Description |
out | quat2 | the receiving dual quaternion |
|
a | ReadonlyQuat2 | the dual quaternion to rotate |
|
rad | number | how far should the rotation be |
Return:
quat2 | out |
public rotateY(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, rad: Number): vec3 source
import {rotateY} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Rotate a 3D vector around the y-axis
Params:
Name | Type | Attribute | Description |
out | vec3 | The receiving vec3 |
|
a | ReadonlyVec3 | The vec3 point to rotate |
|
b | ReadonlyVec3 | The origin of the rotation |
|
rad | Number | The angle of rotation in radians |
Return:
vec3 | out |
public rotateZ(out: mat4, a: ReadonlyMat4, rad: Number): mat4 source
import {rotateZ} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Rotates a matrix by the given angle around the Z axis
Params:
Name | Type | Attribute | Description |
out | mat4 | the receiving matrix |
|
a | ReadonlyMat4 | the matrix to rotate |
|
rad | Number | the angle to rotate the matrix by |
Return:
mat4 | out |
public rotateZ(out: quat, a: ReadonlyQuat, rad: number): quat source
import {rotateZ} from 'bimsurfer3/viewer/glmatrix/quat.js'
Rotates a quaternion by the given angle about the Z axis
Params:
Name | Type | Attribute | Description |
out | quat | quat receiving operation result |
|
a | ReadonlyQuat | quat to rotate |
|
rad | number | angle (in radians) to rotate |
Return:
quat | out |
public rotateZ(out: quat2, a: ReadonlyQuat2, rad: number): quat2 source
import {rotateZ} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Rotates a dual quat around the Z axis
Params:
Name | Type | Attribute | Description |
out | quat2 | the receiving dual quaternion |
|
a | ReadonlyQuat2 | the dual quaternion to rotate |
|
rad | number | how far should the rotation be |
Return:
quat2 | out |
public rotateZ(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, rad: Number): vec3 source
import {rotateZ} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Rotate a 3D vector around the z-axis
Params:
Name | Type | Attribute | Description |
out | vec3 | The receiving vec3 |
|
a | ReadonlyVec3 | The vec3 point to rotate |
|
b | ReadonlyVec3 | The origin of the rotation |
|
rad | Number | The angle of rotation in radians |
Return:
vec3 | out |
public round(out: vec2, a: ReadonlyVec2): vec2 source
import {round} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Math.round the components of a vec2
Params:
Name | Type | Attribute | Description |
out | vec2 | the receiving vector |
|
a | ReadonlyVec2 | vector to round |
Return:
vec2 | out |
public round(out: vec3, a: ReadonlyVec3): vec3 source
import {round} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Math.round the components of a vec3
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
a | ReadonlyVec3 | vector to round |
Return:
vec3 | out |
public round(out: vec4, a: ReadonlyVec4): vec4 source
import {round} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Math.round the components of a vec4
Params:
Name | Type | Attribute | Description |
out | vec4 | the receiving vector |
|
a | ReadonlyVec4 | vector to round |
Return:
vec4 | out |
public scale(out: mat2, a: ReadonlyMat2, v: ReadonlyVec2): mat2 source
import {scale} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Scales the mat2 by the dimensions in the given vec2
Params:
Name | Type | Attribute | Description |
out | mat2 | the receiving matrix |
|
a | ReadonlyMat2 | the matrix to rotate |
|
v | ReadonlyVec2 | the vec2 to scale the matrix by |
Return:
mat2 | out |
public scale(out: mat2d, a: ReadonlyMat2d, v: ReadonlyVec2): mat2d source
import {scale} from 'bimsurfer3/viewer/glmatrix/mat2d.js'
Scales the mat2d by the dimensions in the given vec2
Params:
Name | Type | Attribute | Description |
out | mat2d | the receiving matrix |
|
a | ReadonlyMat2d | the matrix to translate |
|
v | ReadonlyVec2 | the vec2 to scale the matrix by |
Return:
mat2d | out |
public scale(out: mat3, a: ReadonlyMat3, v: ReadonlyVec2): mat3 source
import {scale} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Scales the mat3 by the dimensions in the given vec2
Params:
Name | Type | Attribute | Description |
out | mat3 | the receiving matrix |
|
a | ReadonlyMat3 | the matrix to rotate |
|
v | ReadonlyVec2 | the vec2 to scale the matrix by |
Return:
mat3 | out |
public scale(out: mat4, a: ReadonlyMat4, v: ReadonlyVec3): mat4 source
import {scale} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Scales the mat4 by the dimensions in the given vec3 not using vectorization
Params:
Name | Type | Attribute | Description |
out | mat4 | the receiving matrix |
|
a | ReadonlyMat4 | the matrix to scale |
|
v | ReadonlyVec3 | the vec3 to scale the matrix by |
Return:
mat4 | out |
public scale(out: quat2, a: ReadonlyQuat2, b: Number): quat2 source
import {scale} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Scales a dual quat by a scalar number
Params:
Name | Type | Attribute | Description |
out | quat2 | the receiving dual quat |
|
a | ReadonlyQuat2 | the dual quat to scale |
|
b | Number | amount to scale the dual quat by |
Return:
quat2 | out |
public scale(out: vec2, a: ReadonlyVec2, b: Number): vec2 source
import {scale} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Scales a vec2 by a scalar number
Params:
Name | Type | Attribute | Description |
out | vec2 | the receiving vector |
|
a | ReadonlyVec2 | the vector to scale |
|
b | Number | amount to scale the vector by |
Return:
vec2 | out |
public scale(out: vec3, a: ReadonlyVec3, b: Number): vec3 source
import {scale} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Scales a vec3 by a scalar number
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
a | ReadonlyVec3 | the vector to scale |
|
b | Number | amount to scale the vector by |
Return:
vec3 | out |
public scale(out: vec4, a: ReadonlyVec4, b: Number): vec4 source
import {scale} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Scales a vec4 by a scalar number
Params:
Name | Type | Attribute | Description |
out | vec4 | the receiving vector |
|
a | ReadonlyVec4 | the vector to scale |
|
b | Number | amount to scale the vector by |
Return:
vec4 | out |
public scaleAndAdd(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2, scale: Number): vec2 source
import {scaleAndAdd} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Adds two vec2's after scaling the second operand by a scalar value
Params:
Name | Type | Attribute | Description |
out | vec2 | the receiving vector |
|
a | ReadonlyVec2 | the first operand |
|
b | ReadonlyVec2 | the second operand |
|
scale | Number | the amount to scale b by before adding |
Return:
vec2 | out |
public scaleAndAdd(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, scale: Number): vec3 source
import {scaleAndAdd} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Adds two vec3's after scaling the second operand by a scalar value
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
a | ReadonlyVec3 | the first operand |
|
b | ReadonlyVec3 | the second operand |
|
scale | Number | the amount to scale b by before adding |
Return:
vec3 | out |
public scaleAndAdd(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4, scale: Number): vec4 source
import {scaleAndAdd} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Adds two vec4's after scaling the second operand by a scalar value
Params:
Name | Type | Attribute | Description |
out | vec4 | the receiving vector |
|
a | ReadonlyVec4 | the first operand |
|
b | ReadonlyVec4 | the second operand |
|
scale | Number | the amount to scale b by before adding |
Return:
vec4 | out |
public set(out: mat2, m00: Number, m01: Number, m10: Number, m11: Number): mat2 source
import {set} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Set the components of a mat2 to the given values
Params:
Name | Type | Attribute | Description |
out | mat2 | the receiving matrix |
|
m00 | Number | Component in column 0, row 0 position (index 0) |
|
m01 | Number | Component in column 0, row 1 position (index 1) |
|
m10 | Number | Component in column 1, row 0 position (index 2) |
|
m11 | Number | Component in column 1, row 1 position (index 3) |
Return:
mat2 | out |
public set(out: mat2d, a: Number, b: Number, c: Number, d: Number, tx: Number, ty: Number): mat2d source
import {set} from 'bimsurfer3/viewer/glmatrix/mat2d.js'
Set the components of a mat2d to the given values
Return:
mat2d | out |
public set(out: mat3, m00: Number, m01: Number, m02: Number, m10: Number, m11: Number, m12: Number, m20: Number, m21: Number, m22: Number): mat3 source
import {set} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Set the components of a mat3 to the given values
Params:
Name | Type | Attribute | Description |
out | mat3 | the receiving matrix |
|
m00 | Number | Component in column 0, row 0 position (index 0) |
|
m01 | Number | Component in column 0, row 1 position (index 1) |
|
m02 | Number | Component in column 0, row 2 position (index 2) |
|
m10 | Number | Component in column 1, row 0 position (index 3) |
|
m11 | Number | Component in column 1, row 1 position (index 4) |
|
m12 | Number | Component in column 1, row 2 position (index 5) |
|
m20 | Number | Component in column 2, row 0 position (index 6) |
|
m21 | Number | Component in column 2, row 1 position (index 7) |
|
m22 | Number | Component in column 2, row 2 position (index 8) |
Return:
mat3 | out |
public set(out: mat4, m00: Number, m01: Number, m02: Number, m03: Number, m10: Number, m11: Number, m12: Number, m13: Number, m20: Number, m21: Number, m22: Number, m23: Number, m30: Number, m31: Number, m32: Number, m33: Number): mat4 source
import {set} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Set the components of a mat4 to the given values
Params:
Name | Type | Attribute | Description |
out | mat4 | the receiving matrix |
|
m00 | Number | Component in column 0, row 0 position (index 0) |
|
m01 | Number | Component in column 0, row 1 position (index 1) |
|
m02 | Number | Component in column 0, row 2 position (index 2) |
|
m03 | Number | Component in column 0, row 3 position (index 3) |
|
m10 | Number | Component in column 1, row 0 position (index 4) |
|
m11 | Number | Component in column 1, row 1 position (index 5) |
|
m12 | Number | Component in column 1, row 2 position (index 6) |
|
m13 | Number | Component in column 1, row 3 position (index 7) |
|
m20 | Number | Component in column 2, row 0 position (index 8) |
|
m21 | Number | Component in column 2, row 1 position (index 9) |
|
m22 | Number | Component in column 2, row 2 position (index 10) |
|
m23 | Number | Component in column 2, row 3 position (index 11) |
|
m30 | Number | Component in column 3, row 0 position (index 12) |
|
m31 | Number | Component in column 3, row 1 position (index 13) |
|
m32 | Number | Component in column 3, row 2 position (index 14) |
|
m33 | Number | Component in column 3, row 3 position (index 15) |
Return:
mat4 | out |
public set(out: quat2, x1: Number, y1: Number, z1: Number, w1: Number, x2: Number, y2: Number, z2: Number, w2: Number): quat2 source
import {set} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Set the components of a dual quat to the given values
Return:
quat2 | out |
public set(out: vec2, x: Number, y: Number): vec2 source
import {set} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Set the components of a vec2 to the given values
Return:
vec2 | out |
public set(out: vec3, x: Number, y: Number, z: Number): vec3 source
import {set} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Set the components of a vec3 to the given values
Return:
vec3 | out |
public set(out: vec4, x: Number, y: Number, z: Number, w: Number): vec4 source
import {set} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Set the components of a vec4 to the given values
Return:
vec4 | out |
public setAxisAngle(out: quat, axis: ReadonlyVec3, rad: Number): quat source
import {setAxisAngle} from 'bimsurfer3/viewer/glmatrix/quat.js'
Sets a quat from the given angle and rotation axis, then returns it.
Params:
Name | Type | Attribute | Description |
out | quat | the receiving quaternion |
|
axis | ReadonlyVec3 | the axis around which to rotate |
|
rad | Number | the angle in radians |
Return:
quat | out |
public setDual(out: quat2, q: ReadonlyQuat): quat2 source
import {setDual} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Set the dual component of a dual quat to the given quaternion
Params:
Name | Type | Attribute | Description |
out | quat2 | the receiving quaternion |
|
q | ReadonlyQuat | a quaternion representing the dual part |
Return:
quat2 | out |
public setMatrixArrayType(type: Float32ArrayConstructor | ArrayConstructor) source
import {setMatrixArrayType} from 'bimsurfer3/viewer/glmatrix/common.js'
Sets the type of array used when creating new vectors and matrices
Params:
Name | Type | Attribute | Description |
type | Float32ArrayConstructor | ArrayConstructor | Array type, such as Float32Array or Array |
public slerp(out: quat, a: ReadonlyQuat, b: ReadonlyQuat, t: Number): quat source
import {slerp} from 'bimsurfer3/viewer/glmatrix/quat.js'
Performs a spherical linear interpolation between two quat
Params:
Name | Type | Attribute | Description |
out | quat | the receiving quaternion |
|
a | ReadonlyQuat | the first operand |
|
b | ReadonlyQuat | the second operand |
|
t | Number | interpolation amount, in the range [0-1], between the two inputs |
Return:
quat | out |
public squaredDistance(a: ReadonlyVec2, b: ReadonlyVec2): Number source
import {squaredDistance} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Calculates the squared euclidian distance between two vec2's
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec2 | the first operand |
|
b | ReadonlyVec2 | the second operand |
public squaredDistance(a: ReadonlyVec3, b: ReadonlyVec3): Number source
import {squaredDistance} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Calculates the squared euclidian distance between two vec3's
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec3 | the first operand |
|
b | ReadonlyVec3 | the second operand |
public squaredDistance(a: ReadonlyVec4, b: ReadonlyVec4): Number source
import {squaredDistance} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Calculates the squared euclidian distance between two vec4's
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec4 | the first operand |
|
b | ReadonlyVec4 | the second operand |
public squaredLength(a: ReadonlyVec2): Number source
import {squaredLength} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Calculates the squared length of a vec2
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec2 | vector to calculate squared length of |
public squaredLength(a: ReadonlyVec3): Number source
import {squaredLength} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Calculates the squared length of a vec3
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec3 | vector to calculate squared length of |
public squaredLength(a: ReadonlyVec4): Number source
import {squaredLength} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Calculates the squared length of a vec4
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec4 | vector to calculate squared length of |
public str(a: ReadonlyMat2): String source
import {str} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Returns a string representation of a mat2
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat2 | matrix to represent as a string |
public str(a: ReadonlyMat2d): String source
import {str} from 'bimsurfer3/viewer/glmatrix/mat2d.js'
Returns a string representation of a mat2d
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat2d | matrix to represent as a string |
public str(a: ReadonlyMat3): String source
import {str} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Returns a string representation of a mat3
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat3 | matrix to represent as a string |
public str(a: ReadonlyMat4): String source
import {str} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Returns a string representation of a mat4
Params:
Name | Type | Attribute | Description |
a | ReadonlyMat4 | matrix to represent as a string |
public str(a: ReadonlyQuat): String source
import {str} from 'bimsurfer3/viewer/glmatrix/quat.js'
Returns a string representation of a quatenion
Params:
Name | Type | Attribute | Description |
a | ReadonlyQuat | vector to represent as a string |
public str(a: ReadonlyQuat2): String source
import {str} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Returns a string representation of a dual quatenion
Params:
Name | Type | Attribute | Description |
a | ReadonlyQuat2 | dual quaternion to represent as a string |
public str(a: ReadonlyVec2): String source
import {str} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Returns a string representation of a vector
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec2 | vector to represent as a string |
public str(a: ReadonlyVec3): String source
import {str} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Returns a string representation of a vector
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec3 | vector to represent as a string |
public str(a: ReadonlyVec4): String source
import {str} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Returns a string representation of a vector
Params:
Name | Type | Attribute | Description |
a | ReadonlyVec4 | vector to represent as a string |
public subtract(out: mat2, a: ReadonlyMat2, b: ReadonlyMat2): mat2 source
import {subtract} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Subtracts matrix b from matrix a
Params:
Name | Type | Attribute | Description |
out | mat2 | the receiving matrix |
|
a | ReadonlyMat2 | the first operand |
|
b | ReadonlyMat2 | the second operand |
Return:
mat2 | out |
public subtract(out: mat2d, a: ReadonlyMat2d, b: ReadonlyMat2d): mat2d source
import {subtract} from 'bimsurfer3/viewer/glmatrix/mat2d.js'
Subtracts matrix b from matrix a
Params:
Name | Type | Attribute | Description |
out | mat2d | the receiving matrix |
|
a | ReadonlyMat2d | the first operand |
|
b | ReadonlyMat2d | the second operand |
Return:
mat2d | out |
public subtract(out: mat3, a: ReadonlyMat3, b: ReadonlyMat3): mat3 source
import {subtract} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Subtracts matrix b from matrix a
Params:
Name | Type | Attribute | Description |
out | mat3 | the receiving matrix |
|
a | ReadonlyMat3 | the first operand |
|
b | ReadonlyMat3 | the second operand |
Return:
mat3 | out |
public subtract(out: mat4, a: ReadonlyMat4, b: ReadonlyMat4): mat4 source
import {subtract} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Subtracts matrix b from matrix a
Params:
Name | Type | Attribute | Description |
out | mat4 | the receiving matrix |
|
a | ReadonlyMat4 | the first operand |
|
b | ReadonlyMat4 | the second operand |
Return:
mat4 | out |
public subtract(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 source
import {subtract} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Subtracts vector b from vector a
Params:
Name | Type | Attribute | Description |
out | vec2 | the receiving vector |
|
a | ReadonlyVec2 | the first operand |
|
b | ReadonlyVec2 | the second operand |
Return:
vec2 | out |
public subtract(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 source
import {subtract} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Subtracts vector b from vector a
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
a | ReadonlyVec3 | the first operand |
|
b | ReadonlyVec3 | the second operand |
Return:
vec3 | out |
public subtract(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 source
import {subtract} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Subtracts vector b from vector a
Params:
Name | Type | Attribute | Description |
out | vec4 | the receiving vector |
|
a | ReadonlyVec4 | the first operand |
|
b | ReadonlyVec4 | the second operand |
Return:
vec4 | out |
public targetTo(out: mat4, eye: ReadonlyVec3, center: ReadonlyVec3, up: ReadonlyVec3): mat4 source
import {targetTo} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Generates a matrix that makes something look at something else.
Params:
Name | Type | Attribute | Description |
out | mat4 | mat4 frustum matrix will be written into |
|
eye | ReadonlyVec3 | Position of the viewer |
|
center | ReadonlyVec3 | Point the viewer is looking at |
|
up | ReadonlyVec3 | vec3 pointing up |
Return:
mat4 | out |
public toRadian(a: Number): * source
import {toRadian} from 'bimsurfer3/viewer/glmatrix/common.js'
Convert Degree To Radian
Params:
Name | Type | Attribute | Description |
a | Number | Angle in Degrees |
Return:
* |
public transformMat2(out: vec2, a: ReadonlyVec2, m: ReadonlyMat2): vec2 source
import {transformMat2} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Transforms the vec2 with a mat2
Params:
Name | Type | Attribute | Description |
out | vec2 | the receiving vector |
|
a | ReadonlyVec2 | the vector to transform |
|
m | ReadonlyMat2 | matrix to transform with |
Return:
vec2 | out |
public transformMat2d(out: vec2, a: ReadonlyVec2, m: ReadonlyMat2d): vec2 source
import {transformMat2d} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Transforms the vec2 with a mat2d
Params:
Name | Type | Attribute | Description |
out | vec2 | the receiving vector |
|
a | ReadonlyVec2 | the vector to transform |
|
m | ReadonlyMat2d | matrix to transform with |
Return:
vec2 | out |
public transformMat3(out: vec2, a: ReadonlyVec2, m: ReadonlyMat3): vec2 source
import {transformMat3} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Transforms the vec2 with a mat3 3rd vector component is implicitly '1'
Params:
Name | Type | Attribute | Description |
out | vec2 | the receiving vector |
|
a | ReadonlyVec2 | the vector to transform |
|
m | ReadonlyMat3 | matrix to transform with |
Return:
vec2 | out |
public transformMat3(out: vec3, a: ReadonlyVec3, m: ReadonlyMat3): vec3 source
import {transformMat3} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Transforms the vec3 with a mat3.
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
a | ReadonlyVec3 | the vector to transform |
|
m | ReadonlyMat3 | the 3x3 matrix to transform with |
Return:
vec3 | out |
public transformMat4(out: vec2, a: ReadonlyVec2, m: ReadonlyMat4): vec2 source
import {transformMat4} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Transforms the vec2 with a mat4 3rd vector component is implicitly '0' 4th vector component is implicitly '1'
Params:
Name | Type | Attribute | Description |
out | vec2 | the receiving vector |
|
a | ReadonlyVec2 | the vector to transform |
|
m | ReadonlyMat4 | matrix to transform with |
Return:
vec2 | out |
public transformMat4(out: vec3, a: ReadonlyVec3, m: ReadonlyMat4): vec3 source
import {transformMat4} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Transforms the vec3 with a mat4. 4th vector component is implicitly '1'
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
a | ReadonlyVec3 | the vector to transform |
|
m | ReadonlyMat4 | matrix to transform with |
Return:
vec3 | out |
public transformMat4(out: vec4, a: ReadonlyVec4, m: ReadonlyMat4): vec4 source
import {transformMat4} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Transforms the vec4 with a mat4.
Params:
Name | Type | Attribute | Description |
out | vec4 | the receiving vector |
|
a | ReadonlyVec4 | the vector to transform |
|
m | ReadonlyMat4 | matrix to transform with |
Return:
vec4 | out |
public transformQuat(out: vec3, a: ReadonlyVec3, q: ReadonlyQuat): vec3 source
import {transformQuat} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Transforms the vec3 with a quat Can also be used for dual quaternions. (Multiply it with the real part)
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
|
a | ReadonlyVec3 | the vector to transform |
|
q | ReadonlyQuat | quaternion to transform with |
Return:
vec3 | out |
public transformQuat(out: vec4, a: ReadonlyVec4, q: ReadonlyQuat): vec4 source
import {transformQuat} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Transforms the vec4 with a quat
Params:
Name | Type | Attribute | Description |
out | vec4 | the receiving vector |
|
a | ReadonlyVec4 | the vector to transform |
|
q | ReadonlyQuat | quaternion to transform with |
Return:
vec4 | out |
public translate(out: mat2d, a: ReadonlyMat2d, v: ReadonlyVec2): mat2d source
import {translate} from 'bimsurfer3/viewer/glmatrix/mat2d.js'
Translates the mat2d by the dimensions in the given vec2
Params:
Name | Type | Attribute | Description |
out | mat2d | the receiving matrix |
|
a | ReadonlyMat2d | the matrix to translate |
|
v | ReadonlyVec2 | the vec2 to translate the matrix by |
Return:
mat2d | out |
public translate(out: mat3, a: ReadonlyMat3, v: ReadonlyVec2): mat3 source
import {translate} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Translate a mat3 by the given vector
Params:
Name | Type | Attribute | Description |
out | mat3 | the receiving matrix |
|
a | ReadonlyMat3 | the matrix to translate |
|
v | ReadonlyVec2 | vector to translate by |
Return:
mat3 | out |
public translate(out: mat4, a: ReadonlyMat4, v: ReadonlyVec3): mat4 source
import {translate} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Translate a mat4 by the given vector
Params:
Name | Type | Attribute | Description |
out | mat4 | the receiving matrix |
|
a | ReadonlyMat4 | the matrix to translate |
|
v | ReadonlyVec3 | vector to translate by |
Return:
mat4 | out |
public translate(out: quat2, a: ReadonlyQuat2, v: ReadonlyVec3): quat2 source
import {translate} from 'bimsurfer3/viewer/glmatrix/quat2.js'
Translates a dual quat by the given vector
Params:
Name | Type | Attribute | Description |
out | quat2 | the receiving dual quaternion |
|
a | ReadonlyQuat2 | the dual quaternion to translate |
|
v | ReadonlyVec3 | vector to translate by |
Return:
quat2 | out |
public transpose(out: mat2, a: ReadonlyMat2): mat2 source
import {transpose} from 'bimsurfer3/viewer/glmatrix/mat2.js'
Transpose the values of a mat2
Params:
Name | Type | Attribute | Description |
out | mat2 | the receiving matrix |
|
a | ReadonlyMat2 | the source matrix |
Return:
mat2 | out |
public transpose(out: mat3, a: ReadonlyMat3): mat3 source
import {transpose} from 'bimsurfer3/viewer/glmatrix/mat3.js'
Transpose the values of a mat3
Params:
Name | Type | Attribute | Description |
out | mat3 | the receiving matrix |
|
a | ReadonlyMat3 | the source matrix |
Return:
mat3 | out |
public transpose(out: mat4, a: ReadonlyMat4): mat4 source
import {transpose} from 'bimsurfer3/viewer/glmatrix/mat4.js'
Transpose the values of a mat4
Params:
Name | Type | Attribute | Description |
out | mat4 | the receiving matrix |
|
a | ReadonlyMat4 | the source matrix |
Return:
mat4 | out |
public zero(out: vec2): vec2 source
import {zero} from 'bimsurfer3/viewer/glmatrix/vec2.js'
Set the components of a vec2 to zero
Params:
Name | Type | Attribute | Description |
out | vec2 | the receiving vector |
Return:
vec2 | out |
public zero(out: vec3): vec3 source
import {zero} from 'bimsurfer3/viewer/glmatrix/vec3.js'
Set the components of a vec3 to zero
Params:
Name | Type | Attribute | Description |
out | vec3 | the receiving vector |
Return:
vec3 | out |
public zero(out: vec4): vec4 source
import {zero} from 'bimsurfer3/viewer/glmatrix/vec4.js'
Set the components of a vec4 to zero
Params:
Name | Type | Attribute | Description |
out | vec4 | the receiving vector |
Return:
vec4 | out |