Package com.io7m.jcamera

# Class JCameraFPSStyle

java.lang.Object
com.io7m.jcamera.JCameraFPSStyle

All Implemented Interfaces:
  `JCameraFPSStyleReadableType`, `JCameraFPSStyleType`, `JCameraReadableType`, `JCameraType`

@EqualityStructural public final class JCameraFPSStyle extends Object implements JCameraFPSStyleType
The default implementation of `JCameraFPSStyleType`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `cameraClampHorizontalDisable()`
  Do not clamp rotations around the horizontal axis.
  `void`
  `cameraClampHorizontalEnable(double min, double max)`
  Clamp the possible rotations around the horizontal axis to the given bounds.
  `double`
  `cameraGetAngleAroundHorizontal()`
  `double`
  `cameraGetAngleAroundVertical()`
  `com.io7m.jtensors.core.unparameterized.vectors.Vector3D`
  `cameraGetForward()`
  `com.io7m.jtensors.core.unparameterized.vectors.Vector3D`
  `cameraGetPosition()`
  `com.io7m.jtensors.core.unparameterized.vectors.Vector3D`
  `cameraGetRight()`
  `com.io7m.jtensors.core.unparameterized.vectors.Vector3D`
  `cameraGetUp()`
  `com.io7m.jtensors.core.unparameterized.matrices.Matrix4x4D`
  `cameraMakeViewMatrix()`
  Construct a view matrix for the camera.
  `<T0, T1> com.io7m.jtensors.core.parameterized.matrices.PMatrix4x4D<T0,T1>`
  `cameraMakeViewPMatrix()`
  Construct a view matrix for the camera.
  `void`
  `cameraMoveForward(double u)`
  Move the camera forward `u` units iff `u` is positive, or backward `u` units iff `u` is negative.
  `void`
  `cameraMoveRight(double u)`
  Move the camera right `u` units iff `u` is positive, or left `u` units iff `u` is negative.
  `void`
  `cameraMoveUp(double u)`
  Move the camera up `u` units iff `u` is positive, or down `u` units iff `u` is negative.
  `boolean`
  `cameraRotateAroundHorizontal(double r)`
  Rotate by `r` radians around the local X axis.
  `void`
  `cameraRotateAroundVertical(double r)`
  Rotate by `r` radians around the global Y axis.
  `void`
  `cameraSetAngleAroundHorizontal(double h)`
  Set the angle around the horizontal axis to `h`.
  `void`
  `cameraSetAngleAroundVertical(double v)`
  Set the angle around the vertical axis to `v`.
  `void`
  `cameraSetPosition(com.io7m.jtensors.core.unparameterized.vectors.Vector3D v)`
  Set the position of the camera.
  `void`
  `cameraSetPosition3(double x, double y, double z)`
  Set the position of the camera.
  `boolean`
  `equals(Object o)`
  `int`
  `hashCode()`
  `static JCameraFPSStyleType`
  `newCamera()`
  `static JCameraFPSStyleType`
  `newCameraFrom(JCameraFPSStyleReadableType c)`
  `String`
  `toString()`

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

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### newCamera

    public static JCameraFPSStyleType newCamera()
    Returns:
      A new FPS camera

  - ### newCameraFrom

    public static JCameraFPSStyleType newCameraFrom(JCameraFPSStyleReadableType c)
    Parameters:
      `c` - An existing camera
    Returns:
      A new FPS camera based on the given camera.

  - ### cameraClampHorizontalDisable

    public void cameraClampHorizontalDisable()
    Description copied from interface: `JCameraFPSStyleType`
    Do not clamp rotations around the horizontal axis.
    Specified by:
      `cameraClampHorizontalDisable` in interface `JCameraFPSStyleType`
    See Also:
      - `JCameraFPSStyleType.cameraClampHorizontalEnable(double, double)`

  - ### cameraClampHorizontalEnable

    public void cameraClampHorizontalEnable(double min, double max)
    Description copied from interface: `JCameraFPSStyleType`
    Clamp the possible rotations around the horizontal axis to the given bounds.
    Specified by:
      `cameraClampHorizontalEnable` in interface `JCameraFPSStyleType`
    Parameters:
      `min` - The minimum angle
      `max` - The maximum angle

  - ### cameraGetAngleAroundHorizontal

    public double cameraGetAngleAroundHorizontal()
    Specified by:
      `cameraGetAngleAroundHorizontal` in interface `JCameraFPSStyleReadableType`
    Returns:
      The angle around the horizontal axis.

  - ### cameraGetAngleAroundVertical

    public double cameraGetAngleAroundVertical()
    Specified by:
      `cameraGetAngleAroundVertical` in interface `JCameraFPSStyleReadableType`
    Returns:
      The angle around the vertical axis.

  - ### cameraGetForward

    public com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetForward()
    Specified by:
      `cameraGetForward` in interface `JCameraFPSStyleReadableType`
    Returns:
      The forward direction for the camera.

  - ### cameraGetPosition

    public com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetPosition()
    Specified by:
      `cameraGetPosition` in interface `JCameraFPSStyleReadableType`
    Returns:
      The position of the camera.

  - ### cameraGetRight

    public com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetRight()
    Specified by:
      `cameraGetRight` in interface `JCameraFPSStyleReadableType`
    Returns:
      The right direction for the camera.

  - ### cameraGetUp

    public com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetUp()
    Specified by:
      `cameraGetUp` in interface `JCameraFPSStyleReadableType`
    Returns:
      The up direction for the camera.

  - ### cameraMakeViewMatrix

    public com.io7m.jtensors.core.unparameterized.matrices.Matrix4x4D cameraMakeViewMatrix()
    Description copied from interface: `JCameraReadableType`
    Construct a view matrix for the camera.
    Specified by:
      `cameraMakeViewMatrix` in interface `JCameraReadableType`
    Returns:
      A view matrix for the camera

  - ### cameraMakeViewPMatrix

    public <T0, T1> com.io7m.jtensors.core.parameterized.matrices.PMatrix4x4D<T0,T1> cameraMakeViewPMatrix()
    Description copied from interface: `JCameraReadableType`
    Construct a view matrix for the camera.
    Specified by:
      `cameraMakeViewPMatrix` in interface `JCameraReadableType`
    Type Parameters:
      `T0` - The source coordinate system
      `T1` - The target coordiante system
    Returns:
      A view matrix for the camera

  - ### cameraMoveForward

    public void cameraMoveForward(double u)
    Description copied from interface: `JCameraFPSStyleType`

    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.

    Specified by:
      `cameraMoveForward` in interface `JCameraFPSStyleType`
    Parameters:
      `u` - The units to move

  - ### cameraMoveRight

    public void cameraMoveRight(double u)
    Description copied from interface: `JCameraFPSStyleType`

    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.

    Specified by:
      `cameraMoveRight` in interface `JCameraFPSStyleType`
    Parameters:
      `u` - The units to move

  - ### cameraMoveUp

    public void cameraMoveUp(double u)
    Description copied from interface: `JCameraFPSStyleType`

    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.

    Specified by:
      `cameraMoveUp` in interface `JCameraFPSStyleType`
    Parameters:
      `u` - The units to move

  - ### cameraRotateAroundHorizontal

    public boolean cameraRotateAroundHorizontal(double r)
    Description copied from interface: `JCameraFPSStyleType`

    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.

    Specified by:
      `cameraRotateAroundHorizontal` in interface `JCameraFPSStyleType`
    Parameters:
      `r` - The radians to rotate
    Returns:
      `true` if the rotation has been clamped
    See Also:
      - `JCameraFPSStyleType.cameraClampHorizontalEnable(double, double)`

  - ### cameraRotateAroundVertical

    public void cameraRotateAroundVertical(double r)
    Description copied from interface: `JCameraFPSStyleType`

    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.

    Specified by:
      `cameraRotateAroundVertical` in interface `JCameraFPSStyleType`
    Parameters:
      `r` - The radians to rotate

  - ### cameraSetAngleAroundHorizontal

    public void cameraSetAngleAroundHorizontal(double h)
    Description copied from interface: `JCameraFPSStyleType`
    Set the angle around the horizontal axis to `h`.
    Specified by:
      `cameraSetAngleAroundHorizontal` in interface `JCameraFPSStyleType`
    Parameters:
      `h` - The angle.

  - ### cameraSetAngleAroundVertical

    public void cameraSetAngleAroundVertical(double v)
    Description copied from interface: `JCameraFPSStyleType`
    Set the angle around the vertical axis to `v`.
    Specified by:
      `cameraSetAngleAroundVertical` in interface `JCameraFPSStyleType`
    Parameters:
      `v` - The angle.

  - ### cameraSetPosition

    public void cameraSetPosition(com.io7m.jtensors.core.unparameterized.vectors.Vector3D v)
    Set the position of the camera.
    Specified by:
      `cameraSetPosition` in interface `JCameraFPSStyleType`
    Parameters:
      `v` - The position.

  - ### cameraSetPosition3

    public void cameraSetPosition3(double x, double y, double z)
    Set the position of the camera.
    Specified by:
      `cameraSetPosition3` in interface `JCameraFPSStyleType`
    Parameters:
      `x` - The x coordinate.
      `y` - The y coordinate.
      `z` - The z coordinate.

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`