vrvec4

A vector.

Public Attributes


number length

DEPRECATED since version 2.0.0. Please use vrvec4:getLength() instead.


number w

w element


wx elements


wxy elements


wxyz elements


wxz elements


wxzy elements


wy elements


wyx elements


wyxz elements


wyz elements


wyzx elements


wz elements


wzx elements


wzxy elements


wzy elements


wzyx elements


number x

x element


xw elements


xwy elements


xwyz elements


xwz elements


xwzy elements


xy elements


xyw elements


xywz elements


xyz elements


xyzw elements


xz elements


xzw elements


xzwy elements


xzy elements


xzyw elements


number y

y element


yw elements


ywx elements


ywxz elements


ywz elements


ywzx elements


yx elements


yxw elements


yxwz elements


yxz elements


yxzw elements


yz elements


yzw elements


yzwx elements


yzx elements


yzxw elements


number z

z element


zw elements


zwx elements


zwxy elements


zwy elements


zwyx elements


zx elements


zxw elements


zxwy elements


zxy elements


zxyw elements


zy elements


zyw elements


zywx elements


zyx elements


zyxw elements

Public Member Functions


Any copy()

(vrCopy) Returns a copy of a Vector, Matrix, Ray, Sphere, AABBox, Quaternion or Plane


vrvec3 cross(Any vec2)

(vrCross) Returns the cross product of two vectors. Both vectors must be the same type

Parameters
vec2

Vector 2 {x, y} or {x, y, z}.


number dot(Any vec2)

(vrDot) Returns the dot product of two vectors. Both vectors must be the same type

Parameters
vec2

Vector 2 {x, y} or {x, y, z}.


number getLength()

(vrLength) Returns the length of a vector.


number getLengthSq()

(vrLengthSquared) Returns the squared length of a vector.


Any normalise()

(vrNormalise) Returns normalised vector/matrix.

Returns

Normalised vector or matrix depending on the type passed in


Any operator*()

Any operator+()

Any operator-()

Any operator/()

Any operator=()

No Results.

Getting StartedArchitectureBest PracticesHow ToAdvanced TopicsChangelogvrtreevrtree_cppvtCoreCoreForeign Function InterfaceMetanodesMigrationsObserversPropertiesSettingsTreeUtilitiesAPI DefinitionsVR ExchangePluginsLua API