Creates a vector4.
A new Vector4.
Optional pX: numberx value of the vector.Optional pY: numbery value of the vector.Optional pZ: numberz value of the vector.Optional pW: numberw value of the vector.w value of the vector, i.e. fourth component.
x value of the vector, i.e. first component.
y value of the vector, i.e. second component.
z value of the vector, i.e. third component.
Computes this + (pX,pY,pZ,pW) and stores it into pOut.
If pOut is omitted, the result is stored in "this".
Returns pOut.
pOut.
x value of the vector to add.y value of the vector to add.z value of the vector to add.w value of the vector to add.Optional pOut: Vector4Computes the euclidean distance between this and pVec.
Warning, this function does not assume that w=1, and does not assume the vector4 as a vector3. The w component is used in the calculation.
The distance between this and pVec.
Computes the dot product between this and (pX,pY,pZ,pW).
The dot product ( dot(this, (pX,pY,pZ,pW)) ).
x value of the vector to compute the dot with.y value of the vector to compute the dot with.z value of the vector to compute the dot with.w value of the vector to compute the dot with.Tells if the two vectors are strictly identical.
If you want to tell if the two vector4 represent the same 3D cartesian point, use isHomogeneousEqual.
true if the two vectors are strictly identical.
Tells if the two vectors are homogeneously equivalent.
This function tells if the two Vector4 represent the same 3D cartesian point.
true if the two vectors are homogeneously equivalent.
Computes the linear interpolation between this and (pX,pY,pZ,pW) and stores the result in pOut.
pOut = this + pTime x ( (pX,pY,pZ,pW) - this).
If pTime=0, pOut = this.
If pTime=1, pOut = (pX,pY,pZ,pW).
If pOut is omitted, the result of the interpolation is stored in this.
No check is done to ensure pTime is in the range [0,1].
pOut.
x value of the destination vector.y value of the destination vector.z value of the destination vector.w value of the destination vector.Optional pOut: Vector4Computes the linear interpolation between this and pOther and stores the result in pOut.
pOut = this + pTime x ( pOther - this).
If pTime=0, pOut = this.
If pTime=1, pOut = pOther.
If pOut is omitted, the result of the interpolation is stored in this.
No check is done to ensure pTime is in the range [0,1].
pOut.
Computes the normalization of this (i.e. scales "this" such that pOut.length() == 1, a zero vector is left unchanged) and stores the result in pOut.
If pOut is omitted, "this" is normalized.
Warning, this function does not assume that w=1, and does not assume the vector4 as a vector3. The w component is used in the calculation.
pOut.
Optional pOut: Vector4Computes the euclidean distance from the plane represented by this to pPoint.
The Vector4 can be the parametric equation of a plane in the form P: {t,u,v} / at + bu + cv = d.
So, with the components x,y,z,w of the vector 4 : {t,u,v} / xt + yu + zv = w where (x,y,z) is the normal
vector of the plane.
The distance between the plane represented by this and pPoint.
Computes the scale of this by the scalar pScalar, and stores the result in pOut.
pOut = pScalar x this.
If pOut is omitted, the result is stored in this.
pOut.
Optional pOut: Vector4Sets this Vector4 to be the representation of the plane defined by its normal and a point of this plane.
No check is done to ensure that pNormal is normalized.
The Vector4 can be the parametric equation of a plane in the form P: {t,u,v} / at + bu + cv = d.
So, with the components x,y,z,w of the vector 4 : {t,u,v} / xt + yu + zv = w where (x,y,z) is the normal
vector of the plane.
this.
Computes the squared euclidean distance between this and pVec.
Warning, this function does not assume that w=1, and does not assume the vector4 as a vector3. The w component is used in the calculation.
The squared distance between this and pVec.
Computes this - (pX,pY,pZ,pW) and stores it into pOut.
If pOut is omitted, the result is stored in "this".
Returns pOut.
pOut.
x value of the vector to subtract.y value of the vector to subtract.z value of the vector to subtract.w value of the vector to subtract.Optional pOut: Vector4
A 4 dimensional vector.