vrvec3

A vector.

Public Attributes


number length

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


number pitch

Rotation around X axis (if this is a vector of Euler angles).


number roll

Rotation around Z axis (if this is a vector of Euler angles).


number x

x element


xy elements


xyz elements


xz elements


xzy elements


number y

y element


number yaw

Rotation around Y axis (if this is a vector of Euler angles).


yx elements


yxz elements


yz elements


yzx elements


number z

z element


zx elements


zxy elements


zy elements


zyx 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