computeModelViewMatrix

fun computeModelViewMatrix(camera: PinholeCamera, result: FloatArray)

Computes model-view matrix using provided pinhole camera.

The model-view matrix defines the amount of translation and rotation between the camera and vertices to be drawn in the scene.

Parameters

camera

pinhole camera.

result

16-length array that will store the resulting matrix.


fun computeModelViewMatrix(cameraRotation: Rotation3D, cameraCenter: Point3D, result: FloatArray)

Computes model-view matrix using provided camera rotation and center.

The model-view matrix defines the amount of translation and rotation between the camera and vertices to be drawn in the scene.

Parameters

cameraRotation

camera rotation.

cameraCenter

camera center.

result

16-length array that will store the resulting matrix.


fun computeModelViewMatrix(rotationMatrix: Matrix, cameraCenter: Point3D, result: FloatArray)

Computes model-view matrix using provided camera rotation and center.

The model-view matrix defines the amount of translation and rotation between the camera and vertices to be drawn in the scene.

Parameters

rotationMatrix

3x3 matrix defining camera rotation. This matrix must be orthonormal.

cameraCenter

camera center.

result

16-length array that will store the resulting matrix.