Home Reference Source Repository
import Vector4 from 'dh3dlib/js/base/Vector4.js'
public class | source

Vector4

Vector4 class

Constructor Summary

Public Constructor
public

constructor(x: float, y: float, z: float, w: float)

constructor

Member Summary

Public Members
public

w: *

public

x: *

public

y: *

public

z: *

Method Summary

Public Methods
public

clone(): *

public

createAxis(axis: *, rotAngle: *)

public

cross(src1: *, src2: *)

public

eulerToQuaternion(eulerAngle: *)

public

exp(src: *)

public
public

lerp(src1: *, src2: *, rate: *)

public

ln(src: *)

public

normalize(src: *)

public
public

setValue(x: *, y: number, z: number, w: number)

public

slerp(src1: *, src2: *, rate: *)

public

transform(vec: *, matrix: *)

Public Constructors

public constructor(x: float, y: float, z: float, w: float) source

constructor

Params:

NameTypeAttributeDescription
x float
y float
z float
w float

Public Members

public w: * source

public x: * source

public y: * source

public z: * source

Public Methods

public clone(): * source

Return:

*

public createAxis(axis: *, rotAngle: *) source

Params:

NameTypeAttributeDescription
axis *
rotAngle *

public cross(src1: *, src2: *) source

Params:

NameTypeAttributeDescription
src1 *
src2 *

public eulerToQuaternion(eulerAngle: *) source

Params:

NameTypeAttributeDescription
eulerAngle *

public exp(src: *) source

Params:

NameTypeAttributeDescription
src *

public getWebGLFloatArray(): * source

Return:

*

public lerp(src1: *, src2: *, rate: *) source

Params:

NameTypeAttributeDescription
src1 *
src2 *
rate *

public ln(src: *) source

Params:

NameTypeAttributeDescription
src *

public normalize(src: *) source

Params:

NameTypeAttributeDescription
src *
  • optional

public quaternionFromMatrix(mat: *) source

Params:

NameTypeAttributeDescription
mat *

public setValue(x: *, y: number, z: number, w: number) source

Params:

NameTypeAttributeDescription
x *
y number
  • optional
  • default: 0
z number
  • optional
  • default: 0
w number
  • optional
  • default: 0

public slerp(src1: *, src2: *, rate: *) source

Params:

NameTypeAttributeDescription
src1 *
src2 *
rate *

public transform(vec: *, matrix: *) source

Params:

NameTypeAttributeDescription
vec *
matrix *