com.io7m.jcanephora.core

## Class JCGLViewMatrices

- java.lang.Object
- - com.io7m.jcanephora.core.JCGLViewMatrices

-     public final class JCGLViewMatrices
      extends Object

  Functions to produce view matrices.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static com.io7m.jtensors.core.unparameterized.matrices.Matrix4x4D` | `lookAtRH(com.io7m.jtensors.core.unparameterized.vectors.Vector3D camera, com.io7m.jtensors.core.unparameterized.vectors.Vector3D target, com.io7m.jtensors.core.unparameterized.vectors.Vector3D up)` Calculate a view matrix representing a camera looking from the point `camera` to the point `target`.
    `static <A,B> com.io7m.jtensors.core.parameterized.matrices.PMatrix4x4D<A,B>` | `lookAtRHP(com.io7m.jtensors.core.unparameterized.vectors.Vector3D camera, com.io7m.jtensors.core.unparameterized.vectors.Vector3D target, com.io7m.jtensors.core.unparameterized.vectors.Vector3D up)` Calculate a view matrix representing a camera looking from the point `camera` to the point `target`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### lookAtRH

          public static com.io7m.jtensors.core.unparameterized.matrices.Matrix4x4D lookAtRH(com.io7m.jtensors.core.unparameterized.vectors.Vector3D camera,
                                                                                            com.io7m.jtensors.core.unparameterized.vectors.Vector3D target,
                                                                                            com.io7m.jtensors.core.unparameterized.vectors.Vector3D up)

      Calculate 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 function assumes a right-handed coordinate system.

      Parameters:
        `camera` - The position of the viewer.
        `target` - The target being viewed.
        `up` - The up vector.
      Returns:
        The view matrix

    - #### lookAtRHP

          public static <A,B> com.io7m.jtensors.core.parameterized.matrices.PMatrix4x4D<A,B> lookAtRHP(com.io7m.jtensors.core.unparameterized.vectors.Vector3D camera,
                                                                                                       com.io7m.jtensors.core.unparameterized.vectors.Vector3D target,
                                                                                                       com.io7m.jtensors.core.unparameterized.vectors.Vector3D up)

      Calculate 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 function assumes a right-handed coordinate system.

      Type Parameters:
        `A` - A phantom type parameter, possibly representing a source coordinate system
        `B` - A phantom type parameter, possibly representing a target coordinate system
      Parameters:
        `camera` - The position of the viewer.
        `target` - The target being viewed.
        `up` - The up vector.
      Returns:
        The view matrix

Copyright © 2017 <code@io7m.com> http://io7m.com