public final class JCGLViewMatrices extends Object implements JCGLViewMatricesType
| Modifier and Type | Method and Description |
|---|---|
void |
lookAt(com.io7m.jtensors.MatrixWritable4x4FType out,
com.io7m.jtensors.VectorReadable3FType camera,
com.io7m.jtensors.VectorReadable3FType target,
com.io7m.jtensors.VectorReadable3FType up)
Calculate a view matrix representing a camera looking from the point
camera to the point target. |
static JCGLViewMatricesType |
newMatrices() |
public static JCGLViewMatricesType newMatrices()
JCGLViewMatricesType instancepublic void lookAt(com.io7m.jtensors.MatrixWritable4x4FType out,
com.io7m.jtensors.VectorReadable3FType camera,
com.io7m.jtensors.VectorReadable3FType target,
com.io7m.jtensors.VectorReadable3FType up)
JCGLViewMatricesTypeCalculate a view matrix representing a camera looking from the point
camera to the point target. target must represent
the "up" vector for the camera. Usually, this is simply a unit vector
(0, 1, 0) representing the Y axis.
The view is expressed as a translation and a rotation matrix, which is
multiplied with the contents of out. Therefore, for most use cases,
out should be set to the 4x4 identity matrix before calling the
function.
lookAt in interface JCGLViewMatricesTypeout - The input/output matrix.camera - The position of the viewer.target - The target being viewed.up - The up vector.Copyright © 2015 <code@io7m.com> http://io7m.com