Class WGLWidget.JavaScriptMatrix4x4

Enclosing class:

public static class WGLWidget.JavaScriptMatrix4x4
extends java.lang.Object
A client-side JavaScript matrix.

A JavaScriptMatrix has methods that make it possible to do client-side calculations on matrices.

Using a WGLWidget.JavaScriptMatrix4x4, GL parameters can be modified without communication with the server. The value of the WGLWidget.JavaScriptMatrix4x4 is updated server-side whenever an event is sent to the server.

Important: only the getJsRef() of the return value from a call to WGLWidget::createJavaScriptMatrix() is a variable name that can be used in custom JavaScript to modify a matrix from external scripts. The getJsRef() of return values of operations refer to unnamed temporary objects - rvalues in C++-lingo.

The WGLWidget.JavaScriptMatrix4x4 is represented in JavaScript as an array of 16 elements. This array represents the values of the matrix in column-major order. It is either a Float32Array or a plain JavaScript array.