com.io7m.jcamera

## Class JCameraSpherical

- java.lang.Object
- - com.io7m.jcamera.JCameraSpherical

- All Implemented Interfaces:
    JCameraReadableType, JCameraSphericalReadableType, JCameraSphericalType, JCameraType

      @EqualityStructural
      public final class JCameraSpherical
      extends Object
      implements JCameraSphericalType

  The default implementation of `JCameraSphericalType`.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `cameraClampInclineDisable()` Do not clamp rotations around the horizontal axis.
    `void` | `cameraClampInclineEnable(float min, float max)` Clamp the possible rotations around the horizontal axis to the given bounds.
    `void` | `cameraClampRadiusDisable()` Do not clamp the length of the radius.
    `void` | `cameraClampRadiusEnable(float min, float max)` Clamp the length of the radius to the given bounds.
    `float` | `cameraGetAngleHeading()`
    `float` | `cameraGetAngleIncline()`
    `com.io7m.jtensors.VectorReadable3FType` | `cameraGetForward()`
    `com.io7m.jtensors.VectorReadable3FType` | `cameraGetForwardProjectedOnXZ()`
    `com.io7m.jtensors.VectorReadable3FType` | `cameraGetPosition()`
    `com.io7m.jtensors.VectorReadable3FType` | `cameraGetRight()`
    `com.io7m.jtensors.VectorReadable3FType` | `cameraGetTargetPosition()`
    `com.io7m.jtensors.VectorReadable3FType` | `cameraGetUp()`
    `float` | `cameraGetZoom()`
    `JCameraSphericalSnapshot` | `cameraMakeSnapshot()`
    `void` | `cameraMakeViewMatrix(JCameraContext ctx, com.io7m.jtensors.Matrix4x4FType m)` Construct a view matrix for the camera, using preallocated storage in `ctx` and writing the result to `m`.
    `<T0,T1> void` | `cameraMakeViewPMatrix(JCameraContext ctx, com.io7m.jtensors.parameterized.PMatrix4x4FType<T0,T1> m)` Construct a view matrix for the camera, using preallocated storage in `ctx` and writing the result to `m`.
    `void` | `cameraMoveTargetForwardOnXZ(float u)` Move the target point of the camera forward `u` units iff `u` is positive, or backward `u` units iff `u` is negative.
    `void` | `cameraMoveTargetRight(float u)` Move the target point of the camera right `u` units iff `u` is positive, or left `u` units iff `u` is negative.
    `void` | `cameraMoveTargetUp(float u)` Move the target point of the camera up `u` units iff `u` is positive, or down `u` units iff `u` is negative.
    `void` | `cameraOrbitHeading(float r)`
    `boolean` | `cameraOrbitIncline(float r)`
    `void` | `cameraSetAngleHeading(float v)` Set the heading angle to `a`.
    `void` | `cameraSetAngleIncline(float h)` Set the incline angle to `a`.
    `void` | `cameraSetTargetPosition(com.io7m.jtensors.VectorReadable3FType v)` Set the position of the target point of camera.
    `void` | `cameraSetTargetPosition3f(float x, float y, float z)` Set the position of the target point of camera.
    `void` | `cameraSetZoom(float r)` Set the zoom (or radius) of the camera to `r`.
    `boolean` | `cameraZoomIn(float r)` Zoom in the camera by reducing the radius of the sphere.
    `boolean` | `cameraZoomOut(float r)` Zoom out the camera by increasing the radius of the sphere.
    `boolean` | `equals(Object obj)`
    `int` | `hashCode()`
    `static JCameraSphericalType` | `newCamera()`
    `static JCameraSphericalType` | `newCameraFrom(JCameraSphericalReadableType c)`
    `String` | `toString()`

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

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

- - ### Method Detail

    - #### newCamera

          public static JCameraSphericalType newCamera()

      Returns:
        A new spherical camera.

    - #### newCameraFrom

          public static JCameraSphericalType newCameraFrom(JCameraSphericalReadableType c)

      Parameters:
        `c` - An existing camera
      Returns:
        A new camera based on the given camera.

    - #### cameraClampInclineDisable

          public void cameraClampInclineDisable()

      Description copied from interface: `JCameraSphericalType`
      Do not clamp rotations around the horizontal axis.
      Specified by:
        `cameraClampInclineDisable` in interface `JCameraSphericalType`
      See Also:
        `JCameraSphericalType.cameraClampInclineEnable(float, float)`

    - #### cameraClampInclineEnable

          public void cameraClampInclineEnable(float min,
                                               float max)

      Description copied from interface: `JCameraSphericalType`
      Clamp the possible rotations around the horizontal axis to the given bounds.
      Specified by:
        `cameraClampInclineEnable` in interface `JCameraSphericalType`
      Parameters:
        `min` - The minimum angle
        `max` - The maximum angle

    - #### cameraClampRadiusDisable

          public void cameraClampRadiusDisable()

      Description copied from interface: `JCameraSphericalType`
      Do not clamp the length of the radius.
      Specified by:
        `cameraClampRadiusDisable` in interface `JCameraSphericalType`
      See Also:
        `JCameraSphericalType.cameraClampRadiusEnable(float, float)`

    - #### cameraClampRadiusEnable

          public void cameraClampRadiusEnable(float min,
                                              float max)

      Description copied from interface: `JCameraSphericalType`
      Clamp the length of the radius to the given bounds.
      Specified by:
        `cameraClampRadiusEnable` in interface `JCameraSphericalType`
      Parameters:
        `min` - The minimum length
        `max` - The maximum length

    - #### cameraGetAngleHeading

          public float cameraGetAngleHeading()

      Specified by:
        `cameraGetAngleHeading` in interface `JCameraSphericalReadableType`
      Returns:
        The angle around the vertical axis.

    - #### cameraGetAngleIncline

          public float cameraGetAngleIncline()

      Specified by:
        `cameraGetAngleIncline` in interface `JCameraSphericalReadableType`
      Returns:
        The angle around the horizontal axis.

    - #### cameraGetForward

          public com.io7m.jtensors.VectorReadable3FType cameraGetForward()

      Specified by:
        `cameraGetForward` in interface `JCameraSphericalReadableType`
      Returns:
        The forward direction for the camera.

    - #### cameraGetForwardProjectedOnXZ

          public com.io7m.jtensors.VectorReadable3FType cameraGetForwardProjectedOnXZ()

      Specified by:
        `cameraGetForwardProjectedOnXZ` in interface `JCameraSphericalReadableType`
      Returns:
        The forward direction for the camera, projected onto the X/Z plane.

    - #### cameraGetPosition

          public com.io7m.jtensors.VectorReadable3FType cameraGetPosition()

      Specified by:
        `cameraGetPosition` in interface `JCameraSphericalReadableType`
      Returns:
        The position of the camera.

    - #### cameraGetRight

          public com.io7m.jtensors.VectorReadable3FType cameraGetRight()

      Specified by:
        `cameraGetRight` in interface `JCameraSphericalReadableType`
      Returns:
        The right direction for the camera.

    - #### cameraGetTargetPosition

          public com.io7m.jtensors.VectorReadable3FType cameraGetTargetPosition()

      Specified by:
        `cameraGetTargetPosition` in interface `JCameraSphericalReadableType`
      Returns:
        The position of the camera target.

    - #### cameraGetUp

          public com.io7m.jtensors.VectorReadable3FType cameraGetUp()

      Specified by:
        `cameraGetUp` in interface `JCameraSphericalReadableType`
      Returns:
        The up direction for the camera.

    - #### cameraGetZoom

          public float cameraGetZoom()

      Specified by:
        `cameraGetZoom` in interface `JCameraSphericalReadableType`
      Returns:
        The zoom (or radius) of the camera.

    - #### cameraMakeSnapshot

          public JCameraSphericalSnapshot cameraMakeSnapshot()

      Specified by:
        `cameraMakeSnapshot` in interface `JCameraSphericalReadableType`
      Returns:
        A snapshot of the current camera state.

    - #### cameraMakeViewMatrix

          public void cameraMakeViewMatrix(JCameraContext ctx,
                                           com.io7m.jtensors.Matrix4x4FType m)

      Description copied from interface: `JCameraReadableType`
      Construct a view matrix for the camera, using preallocated storage in `ctx` and writing the result to `m`.
      Specified by:
        `cameraMakeViewMatrix` in interface `JCameraReadableType`
      Parameters:
        `ctx` - Preallocated storage
        `m` - The output matrix

    - #### cameraMakeViewPMatrix

          public <T0,T1> void cameraMakeViewPMatrix(JCameraContext ctx,
                                                    com.io7m.jtensors.parameterized.PMatrix4x4FType<T0,T1> m)

      Description copied from interface: `JCameraReadableType`
      Construct a view matrix for the camera, using preallocated storage in `ctx` and writing the result to `m`.
      Specified by:
        `cameraMakeViewPMatrix` in interface `JCameraReadableType`
      Type Parameters:
        `T0` - The source coordinate system
        `T1` - The target coordiante system
      Parameters:
        `ctx` - Preallocated storage
        `m` - The output matrix

    - #### cameraMoveTargetForwardOnXZ

          public void cameraMoveTargetForwardOnXZ(float u)

      Description copied from interface: `JCameraSphericalType`

      Move the target point of 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 projected onto the X/Z plane. This means that the camera will not move along the Y axis.

      Specified by:
        `cameraMoveTargetForwardOnXZ` in interface `JCameraSphericalType`
      Parameters:
        `u` - The units to move

    - #### cameraMoveTargetRight

          public void cameraMoveTargetRight(float u)

      Description copied from interface: `JCameraSphericalType`

      Move the target point of 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:
        `cameraMoveTargetRight` in interface `JCameraSphericalType`
      Parameters:
        `u` - The units to move

    - #### cameraMoveTargetUp

          public void cameraMoveTargetUp(float u)

      Description copied from interface: `JCameraSphericalType`

      Move the target point of 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:
        `cameraMoveTargetUp` in interface `JCameraSphericalType`
      Parameters:
        `u` - The units to move

    - #### cameraOrbitHeading

          public void cameraOrbitHeading(float r)

      Specified by:
        `cameraOrbitHeading` in interface `JCameraSphericalType`
      Parameters:
        `r` - The radians to rotate

    - #### cameraOrbitIncline

          public boolean cameraOrbitIncline(float r)

      Specified by:
        `cameraOrbitIncline` in interface `JCameraSphericalType`
      Parameters:
        `r` - The radians to orbit
      Returns:
        `true` if the rotation has been clamped
      See Also:
        `JCameraSphericalType.cameraClampInclineEnable(float, float)`

    - #### cameraSetAngleHeading

          public void cameraSetAngleHeading(float v)

      Description copied from interface: `JCameraSphericalType`
      Set the heading angle to `a`.
      Specified by:
        `cameraSetAngleHeading` in interface `JCameraSphericalType`
      Parameters:
        `v` - The angle.

    - #### cameraSetAngleIncline

          public void cameraSetAngleIncline(float h)

      Description copied from interface: `JCameraSphericalType`
      Set the incline angle to `a`.
      Specified by:
        `cameraSetAngleIncline` in interface `JCameraSphericalType`
      Parameters:
        `h` - The angle.

    - #### cameraSetTargetPosition

          public void cameraSetTargetPosition(com.io7m.jtensors.VectorReadable3FType v)

      Description copied from interface: `JCameraSphericalType`
      Set the position of the target point of camera.
      Specified by:
        `cameraSetTargetPosition` in interface `JCameraSphericalType`
      Parameters:
        `v` - The position.

    - #### cameraSetTargetPosition3f

          public void cameraSetTargetPosition3f(float x,
                                                float y,
                                                float z)

      Description copied from interface: `JCameraSphericalType`
      Set the position of the target point of camera.
      Specified by:
        `cameraSetTargetPosition3f` in interface `JCameraSphericalType`
      Parameters:
        `x` - The x coordinate.
        `y` - The y coordinate.
        `z` - The z coordinate.

    - #### cameraSetZoom

          public void cameraSetZoom(float r)

      Description copied from interface: `JCameraSphericalType`
      Set the zoom (or radius) of the camera to `r`.
      Specified by:
        `cameraSetZoom` in interface `JCameraSphericalType`
      Parameters:
        `r` - The camera radius.

    - #### cameraZoomIn

          public boolean cameraZoomIn(float r)

      Description copied from interface: `JCameraSphericalType`
      Zoom in the camera by reducing the radius of the sphere.
      Specified by:
        `cameraZoomIn` in interface `JCameraSphericalType`
      Parameters:
        `r` - The amount by which to reduce the radius
      Returns:
        `true` if the radius has been clamped
      See Also:
        `JCameraSphericalType.cameraClampRadiusEnable(float, float)`

    - #### cameraZoomOut

          public boolean cameraZoomOut(float r)

      Description copied from interface: `JCameraSphericalType`
      Zoom out the camera by increasing the radius of the sphere.
      Specified by:
        `cameraZoomOut` in interface `JCameraSphericalType`
      Parameters:
        `r` - The amount by which to increase the radius
      Returns:
        `true` if the radius has been clamped
      See Also:
        `JCameraSphericalType.cameraClampRadiusEnable(float, float)`

    - #### equals

          public boolean equals(@Nullable
                                Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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