The following classes are exposed to the Lua API:
Along with the following functions:
A three-component vector of type float
.
Construct a vec3
with components x
, y
, and z
.
Construct a vec3
with components all its components initialized to s
.
Copy construct a vec3
from the vector v
.
Addition between vectors.
Subtraction between vectors.
Component-wise multiplication between vectors.
Addition between a vec3
and a float. Is equivalent to vec3 + vec3(float)
, vec3(float) + vec3
respectively.
Subtraction between a vec3
and a float. Is equivalent to vec3 - vec3(float)
, vec3(float) - vec3
respectively.
Multiplication between a vec3
and a float. Is equivalent to vec3 * vec3(float)
, vec3(float) * vec3
respectively.
A four-component vector of type float
.
Construct a vec4
with components x
, y
, z
, and w
.
Construct a vec4
with components all its components initialized to s
.
Copy construct a vec4
from the vector v
.
Addition between vectors.
Subtraction between vectors.
Multiplication between vectors.
Addition between a vec4
and a float. Is equivalent to vec4 + vec4(float)
, vec4(float) + vec4
respectively.
Subtraction between a vec4
and a float. Is equivalent to vec4 - vec4(float)
, vec4(float) - vec4
respectively.
Multiplication between a vec4
and a float. Is equivalent to vec4 * vec4(float)
, vec4(float) * vec4
respectively.
A 3x3 matrix of type float
. The elements are stored in column-major order.
Construct a mat3
with components all its components initialized to s
.
Copy construct a mat3
from the vector m
.
Construct a mat3
from the upper left 3x3 part of mat4
.
Matrix addition.
Matrix subtraction.
Matrix multiplication.
Matrix vector multiplication.
Addition between a mat3
and a float. Is equivalent to mat3 + mat3(float)
, mat3(float) + mat3
respectively.
Subtraction between a mat3
and a float. Is equivalent to mat3 - mat3(float)
, mat3(float) - mat3
respectively.
Multiplication between a mat3
and a float. Is equivalent to mat3 * mat3(float)
, mat3(float) * mat3
respectively.
A 4x4 matrix of type float
. The elements are stored in column-major order.
Vector cross product between vectors va
and vb
.
Dot product between vectors va
and vb
.
Returns the vector v
normalized by its length.
Returns the column i
of the mat3
matrix m
.
Returns the row i
of the mat3
matrix m
.
Returns the inverse of the mat3
matrix m
.
Returns the transpose of the mat3
matrix m
.
Returns the column i
of the mat4
matrix m
.
Returns the row i
of the mat4
matrix m
.
Returns the inverse of the mat4
matrix m
.
Returns the transpose of the mat4
matrix m
.