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(double min, double 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(double min, double max)` Clamp the length of the radius to the given bounds.
    `double` | `cameraGetAngleHeading()`
    `double` | `cameraGetAngleIncline()`
    `com.io7m.jtensors.core.unparameterized.vectors.Vector3D` | `cameraGetForward()`
    `com.io7m.jtensors.core.unparameterized.vectors.Vector3D` | `cameraGetForwardProjectedOnXZ()`
    `com.io7m.jtensors.core.unparameterized.vectors.Vector3D` | `cameraGetPosition()`
    `com.io7m.jtensors.core.unparameterized.vectors.Vector3D` | `cameraGetRight()`
    `com.io7m.jtensors.core.unparameterized.vectors.Vector3D` | `cameraGetTargetPosition()`
    `com.io7m.jtensors.core.unparameterized.vectors.Vector3D` | `cameraGetUp()`
    `double` | `cameraGetZoom()`
    `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` | `cameraMoveTargetForwardOnXZ(double 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(double 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(double 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(double r)`
    `boolean` | `cameraOrbitIncline(double r)`
    `void` | `cameraSetAngleHeading(double v)` Set the heading angle to `a`.
    `void` | `cameraSetAngleIncline(double h)` Set the incline angle to `a`.
    `void` | `cameraSetTargetPosition(com.io7m.jtensors.core.unparameterized.vectors.Vector3D v)` Set the position of the target point of camera.
    `void` | `cameraSetTargetPosition3(double x, double y, double z)` Set the position of the target point of camera.
    `void` | `cameraSetZoom(double r)` Set the zoom (or radius) of the camera to `r`.
    `boolean` | `cameraZoomIn(double r)` Zoom in the camera by reducing the radius of the sphere.
    `boolean` | `cameraZoomOut(double r)` Zoom out the camera by increasing the radius of the sphere.
    `boolean` | `equals(Object o)`
    `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(double, double)`

    - #### cameraClampInclineEnable

          public void cameraClampInclineEnable(double min,
                                               double 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(double, double)`

    - #### cameraClampRadiusEnable

          public void cameraClampRadiusEnable(double min,
                                              double 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 double cameraGetAngleHeading()

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

    - #### cameraGetAngleIncline

          public double cameraGetAngleIncline()

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

    - #### cameraGetForward

          public com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetForward()

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

    - #### cameraGetForwardProjectedOnXZ

          public com.io7m.jtensors.core.unparameterized.vectors.Vector3D 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.core.unparameterized.vectors.Vector3D cameraGetPosition()

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

    - #### cameraGetRight

          public com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetRight()

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

    - #### cameraGetTargetPosition

          public com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetTargetPosition()

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

    - #### cameraGetUp

          public com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetUp()

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

    - #### cameraGetZoom

          public double cameraGetZoom()

      Specified by:
        `cameraGetZoom` in interface `JCameraSphericalReadableType`
      Returns:
        The zoom (or radius) of 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

    - #### cameraMoveTargetForwardOnXZ

          public void cameraMoveTargetForwardOnXZ(double 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(double 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(double 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(double r)

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

    - #### cameraOrbitIncline

          public boolean cameraOrbitIncline(double 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(double, double)`

    - #### cameraSetAngleHeading

          public void cameraSetAngleHeading(double 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(double 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.core.unparameterized.vectors.Vector3D 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.

    - #### cameraSetTargetPosition3

          public void cameraSetTargetPosition3(double x,
                                               double y,
                                               double z)

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

    - #### cameraSetZoom

          public void cameraSetZoom(double 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(double 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(double, double)`

    - #### cameraZoomOut

          public boolean cameraZoomOut(double 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(double, double)`

    - #### 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`

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