com.io7m.jcamera

## Interface JCameraFPSStyleType

- All Superinterfaces:
    JCameraFPSStyleReadableType, JCameraReadableType, JCameraType
  All Known Implementing Classes:
    JCameraFPSStyle

      public interface JCameraFPSStyleType
      extends JCameraType, JCameraFPSStyleReadableType

  The type of first-person shooter style flying cameras that allow for:

  - Rotation around a local X axis
  - Rotation around a global Y axis
  - Movement up and down on the global Y axis
  - Movement left and right on the local X axis
  - Movement forward and backward based on the current orientation on the global Y and local X axes

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `cameraClampHorizontalDisable()` Do not clamp rotations around the horizontal axis.
    `void` | `cameraClampHorizontalEnable(float min, float max)` Clamp the possible rotations around the horizontal axis to the given bounds.
    `void` | `cameraMoveForward(float u)` Move the camera forward `u` units iff `u` is positive, or backward `u` units iff `u` is negative.
    `void` | `cameraMoveRight(float u)` Move the camera right `u` units iff `u` is positive, or left `u` units iff `u` is negative.
    `void` | `cameraMoveUp(float u)` Move the camera up `u` units iff `u` is positive, or down `u` units iff `u` is negative.
    `boolean` | `cameraRotateAroundHorizontal(float r)` Rotate by `r` radians around the local X axis.
    `void` | `cameraRotateAroundVertical(float r)` Rotate by `r` radians around the global Y axis.
    `void` | `cameraSetAngleAroundHorizontal(float h)` Set the angle around the horizontal axis to `h`.
    `void` | `cameraSetAngleAroundVertical(float v)` Set the angle around the vertical axis to `v`.
    `void` | `cameraSetPosition(com.io7m.jtensors.VectorReadable3FType v)` Set the position of the camera.
    `void` | `cameraSetPosition3f(float x, float y, float z)` Set the position of the camera.

    - ### Methods inherited from interface com.io7m.jcamera.JCameraFPSStyleReadableType

      `cameraGetAngleAroundHorizontal, cameraGetAngleAroundVertical, cameraGetForward, cameraGetPosition, cameraGetRight, cameraGetUp, cameraMakeSnapshot`

    - ### Methods inherited from interface com.io7m.jcamera.JCameraReadableType

      `cameraMakeViewMatrix, cameraMakeViewPMatrix`

- - ### Method Detail

    - #### cameraClampHorizontalDisable

          void cameraClampHorizontalDisable()

      Do not clamp rotations around the horizontal axis.
      See Also:
        `cameraClampHorizontalEnable(float, float)`

    - #### cameraClampHorizontalEnable

          void cameraClampHorizontalEnable(float min,
                                           float max)

      Clamp the possible rotations around the horizontal axis to the given bounds.
      Parameters:
        `min` - The minimum angle
        `max` - The maximum angle

    - #### cameraMoveForward

          void cameraMoveForward(float u)

      Move the camera forward `u` units iff `u` is positive, or backward `u` units iff `u` is negative.

      The forward direction, in this case, means the current view direction.

      Parameters:
        `u` - The units to move

    - #### cameraMoveRight

          void cameraMoveRight(float u)

      Move the camera right `u` units iff `u` is positive, or left `u` units iff `u` is negative.

      The right direction, in this case, means the direction perpendicular to the current view direction, `-π / 2` radians around the global Y axis.

      Parameters:
        `u` - The units to move

    - #### cameraMoveUp

          void cameraMoveUp(float u)

      Move the camera up `u` units iff `u` is positive, or down `u` units iff `u` is negative.

      The up direction, in this case, means the direction towards positive infinity on the global Y axis.

      Parameters:
        `u` - The units to move

    - #### cameraRotateAroundHorizontal

          boolean cameraRotateAroundHorizontal(float r)

      Rotate by `r` radians around the local X axis.

      Note that by convention, when looking towards negative infinity on an axis, a positive rotation value results in a counter-clockwise rotation on the axis.

      A human analogy would be that a positive value passed to this function causes the camera to look up towards the sky. A negative value causes the camera to look down towards the ground.

      Parameters:
        `r` - The radians to rotate
      Returns:
        `true` if the rotation has been clamped
      See Also:
        `cameraClampHorizontalEnable(float, float)`

    - #### cameraRotateAroundVertical

          void cameraRotateAroundVertical(float r)

      Rotate by `r` radians around the global Y axis.

      Note that by convention, when looking towards negative infinity on an axis, a positive rotation value results in a counter-clockwise rotation on the axis.

      A human analogy would be that a positive value passed to this function causes the camera to turn left, while a negative value causes the camera to look right.

      Parameters:
        `r` - The radians to rotate

    - #### cameraSetAngleAroundHorizontal

          void cameraSetAngleAroundHorizontal(float h)

      Set the angle around the horizontal axis to `h`.
      Parameters:
        `h` - The angle.

    - #### cameraSetAngleAroundVertical

          void cameraSetAngleAroundVertical(float v)

      Set the angle around the vertical axis to `v`.
      Parameters:
        `v` - The angle.

    - #### cameraSetPosition

          void cameraSetPosition(com.io7m.jtensors.VectorReadable3FType v)

      Set the position of the camera.
      Parameters:
        `v` - The position.

    - #### cameraSetPosition3f

          void cameraSetPosition3f(float x,
                                   float y,
                                   float z)

      Set the position of the camera.
      Parameters:
        `x` - The x coordinate.
        `y` - The y coordinate.
        `z` - The z coordinate.

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