vrmatrix4

A matrix.

Public Attributes


number det

DEPRECATED since version 2.0.0. Please use vrmat4:determinant() instead.


number e00

DEPRECATED since version 2.0.0. Please use vrmatrix4:get(0, 0)/set(0, 0, _) instead.


number e01

DEPRECATED since version 2.0.0. Please use vrmatrix4:get(0, 1)/set(0, 1, _) instead.


number e02

DEPRECATED since version 2.0.0. Please use vrmatrix4:get(0, 2)/set(0, 2, _) instead.


number e03

DEPRECATED since version 2.0.0. Please use vrmatrix4:get(0, 3)/set(0, 3, _) instead.


number e10

DEPRECATED since version 2.0.0. Please use vrmatrix4:get(1, 0)/set(1, 0, _) instead.


number e11

DEPRECATED since version 2.0.0. Please use vrmatrix4:get(1, 1)/set(1, 1, _) instead.


number e12

DEPRECATED since version 2.0.0. Please use vrmatrix4:get(1, 2)/set(1, 2, _) instead.


number e13

DEPRECATED since version 2.0.0. Please use vrmatrix4:get(1, 3)/set(1, 3, _) instead.


number e20

DEPRECATED since version 2.0.0. Please use vrmatrix4:get(2, 0)/set(2, 0, _) instead.


number e21

DEPRECATED since version 2.0.0. Please use vrmatrix4:get(2, 1)/set(2, 1, _) instead.


number e22

DEPRECATED since version 2.0.0. Please use vrmatrix4:get(2, 2)/set(2, 2, _) instead.


number e23

DEPRECATED since version 2.0.0. Please use vrmatrix4:get(2, 3)/set(2, 3, _) instead.


number e30

DEPRECATED since version 2.0.0. Please use vrmatrix4:get(3, 0)/set(3, 0, _) instead.


number e31

DEPRECATED since version 2.0.0. Please use vrmatrix4:get(3, 1)/set(3, 1, _) instead.


number e32

DEPRECATED since version 2.0.0. Please use vrmatrix4:get(3, 2)/set(3, 2, _) instead.


number e33

DEPRECATED since version 2.0.0. Please use vrmatrix4:get(3, 3)/set(3, 3, _) instead.


Forward vector.


vrmat4 inverse

DEPRECATED since version 2.0.0. Please use vrmat4:getInverse() instead.


Position vector.


Right vector.


Rotation component (Euler angles)


Scale component.


vrmat4 transpose

DEPRECATED since version 2.0.0. Please use vrmat4:getTranspose() instead.


Up vector.

Public Member Functions


(vrMatScale) Return M scaled by vector V. If V is a scalar then a vector in which x=v, y=v, z=v will be used.

Parameters
v

The vector or scalar to scale M by.


Any copy()

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


number determinant()

(vrMatDeterminant) Returns the determinant of the matrix


number get(number x,
number y
)

(vrMatGetValue) Get the value of an element of a matrix.

Parameters
x

The column of the element to select.

y

The row of the element to select.


(vrMatInverse) Returns the inverse of a 4x4 matrix.


(vrMatTranspose) Returns the tranpose of a 3x3 matrix, or a 4x4 matrix with the 3x3 component transposed.

Returns

vrmat3 or vrmat4 depending on the type passed in


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=()

(vrMatOrthoNormalise) Returns an orthogonal matrix.

Returns

Orthogonal mat3 or mat4 depending on the type passed in


vrmatrix4 rotateX(number v)

(vrMatRotateEulerX) Return M rotated on the X axis by angle V.

Parameters
v

The angle to rotate M by.


vrmatrix4 rotateY(number v)

(vrMatRotateEulerY) Return M rotated on the Y axis by angle V.

Parameters
v

The angle to rotate M by.


vrmatrix4 rotateZ(number v)

(vrMatRotateEulerZ) Return M rotated on the Z axis by angle V.

Parameters
v

The angle to rotate M by.


void set(number x,
number y,
number v
)

(vrMatSetValue) Set the value of an element of a matrix.

Parameters
x

The column of the element to select.

y

The row of the element to select.

v

The value to set the element.


string toString()

(vrMatToString) Get a string representation of a matrix.


(vrMatTranslate) Return M translated by the vector V.

Parameters
v

The vector to translate the matrix by.

No Results.

Getting StartedArchitectureBest PracticesHow ToAdvanced TopicsChangelogvrtreevrtree_cppvtCoreCoreForeign Function InterfaceMetanodesMigrationsObserversPropertiesSettingsTreeUtilitiesAPI DefinitionsVR ExchangePluginsLua API