Static variables

@:value(0.0174532925199433)staticfinalinlineread onlydegToRad:Float = 0.0174532925199433

@:value(57.2957795130823209)staticfinalinlineread onlyradToDeg:Float = 57.2957795130823209

@:value(6.2831853071795865)staticfinalinlineread onlyTAU:Float = 6.2831853071795865

@:value(1.5707963267948967)staticfinalinlineread onlyPI_2:Float = 1.5707963267948967

@:value(new Vector3D())staticfinalread only__tempVector:Vector3D = new Vector3D()

Cache temporary vectors

@:value(new Vector3D())staticfinalread only__tempVector2:Vector3D = new Vector3D()

@:value(new Vector3D())staticfinalread only__tempVector3:Vector3D = new Vector3D()

@:value(VectorFactory.Float([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]))staticfinalread onlyMATRIX_IDENTITY:Vector<Float> = VectorFactory.Float([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1])

Cached Identity values so no allocation happens when calling openfl's Matrix3D.identity()

@:value(new Vector3D(1, 0, 0))staticfinalread onlyRIGHT:Vector3D = new Vector3D(1, 0, 0)

@:value(new Vector3D(0, 1, 0))staticfinalread onlyUP:Vector3D = new Vector3D(0, 1, 0)

@:value(new Vector3D(0, 0, -1))staticfinalread onlyFORWARD:Vector3D = new Vector3D(0, 0, -1)

@:value(new Vector3D(-1, 0, 0))staticfinalread onlyLEFT:Vector3D = new Vector3D(-1, 0, 0)

@:value(new Vector3D(0, -1, 0))staticfinalread onlyDOWN:Vector3D = new Vector3D(0, -1, 0)

@:value(new Vector3D(0, 0, 1))staticfinalread onlyBACK:Vector3D = new Vector3D(0, 0, 1)

@:value(new Vector3D(0, 0, 0))staticfinalread onlyZERO:Vector3D = new Vector3D(0, 0, 0)

@:value(new Vector3D(1, 1, 1))staticfinalread onlyONE:Vector3D = new Vector3D(1, 1, 1)

@:value([new Matrix3D(), new Matrix3D(), new Matrix3D(), new Matrix3D(), new Matrix3D(), new Matrix3D()])staticfinalread onlyMATRIX_DIRECTIONS:ReadOnlyArray<Matrix3D> = [new Matrix3D(), new Matrix3D(), new Matrix3D(), new Matrix3D(), new Matrix3D(), new Matrix3D()]

A list of matrix directions corresponding to FoxCubemapSide.

Note: The offsets of the matrices can change so it represents positions aswell, if you want it to be at the origin, set matrix.position to FoxMathUtil.ZERO

Static methods

staticstaticInit():Void

staticperspectiveMatrix(mp:Matrix3D, fov:Float, aspect:Float, near:Float, far:Float):Matrix3D

staticperspectiveMatrixClipFast(mp:Matrix3D, near:Float, far:Float):Matrix3D

staticcreatePerspective(fov:Float, aspect:Float, near:Float, far:Float):Matrix3D

staticorthogonalMatrix(mo:Matrix3D, size:Float, aspect:Float, near:Float, far:Float):Matrix3D

staticcreateOrthogonal(size:Float, aspect:Float, near:Float, far:Float):Matrix3D

statictransformMatrix(matTRS:Matrix3D, pos:Vector3D, rotEuler:Vector3D, scale:Vector3D):Matrix3D

staticviewMatrix(matRT:Matrix3D, pos:Vector3D, rotEuler:Vector3D):Matrix3D

staticviewMatrixFromTransform(output:Matrix3D, transform:Matrix3D):Matrix3D

staticcreateTransform(pos:Vector3D, rotEuler:Vector3D, scale:Vector3D):Matrix3D

staticcreateViewMatrix(pos:Vector3D, rotEuler:Vector3D):Matrix3D

staticinlinefastIdentity(matrix:Matrix3D):Void

staticeulerFromMatrix(m:Matrix3D, ?output:Vector3D, ?scale:Vector3D):Vector3D

Extracts the euler angles aka rotation from a transform matrix.

Warning! This assumes the scale is 1, if the scale is other than 1, the rotation will not be accurate and weird things can happen! Make sure to provide a scale vector to fix this if needed.

Note: XYZ order only

staticeulerFromQuaternion(quat:Vector3D, ?output:Vector3D):Vector3D

Converts a quaternion rotation to euler angles. This operation is not safely reversible.

Note: This expects the quaternion vector to be normalized.

staticscaleFromMatrix(m:Matrix3D, ?output:Vector3D):Vector3D

Extracts the scale from a transform matrix.

Make sure to apply this first before extracting euler angles too if needed.

staticdirectionOf(matrix:Matrix3D):Vector3D

staticdirectionOfToOutput(matrix:Matrix3D, output:Vector3D):Vector3D

staticbakeMVP(model:Matrix3D, view:Matrix3D, projection:Matrix3D):Matrix3D