Package com.io7m.jcamera

# Class JCameraSphericalInput

java.lang.Object
com.io7m.jcamera.JCameraSphericalInput

All Implemented Interfaces:
  `JCameraSphericalInputType`

@EqualityReference public final class JCameraSphericalInput extends Object implements JCameraSphericalInputType

An input for a spherical camera.

It is safe to access values of this type from multiple threads.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addTargetMovingContinuousForward(double in_forward)`
  Add a movement forward to the target position.
  `void`
  `addTargetMovingContinuousRight(double in_right)`
  Add a movement right to the target position.
  `double`
  `getForwardFactor()`
  `double`
  `getRightFactor()`
  `double`
  `getTargetMovingForwardContinuous()`
  `double`
  `getTargetMovingRight()`
  `boolean`
  `isOrbitingHeadingNegative()`
  `boolean`
  `isOrbitingHeadingPositive()`
  `boolean`
  `isOrbitingInclineNegative()`
  `boolean`
  `isOrbitingInclinePositive()`
  `boolean`
  `isTargetMovingBackward()`
  `boolean`
  `isTargetMovingDown()`
  `boolean`
  `isTargetMovingForward()`
  `boolean`
  `isTargetMovingLeft()`
  `boolean`
  `isTargetMovingRight()`
  `boolean`
  `isTargetMovingUp()`
  `boolean`
  `isZoomingIn()`
  `boolean`
  `isZoomingOut()`
  `static JCameraSphericalInputType`
  `newInput()`
  `void`
  `setContinuousForwardFactor(double f)`
  Set the multiplication factor used for continuous forward/backward movement.
  `void`
  `setContinuousRightwardFactor(double f)`
  Set the multiplication factor used for continuous left/right movement.
  `void`
  `setOrbitHeadingNegative(boolean o)`
  Tell the camera to start/stop orbiting (for heading) in a negative direction.
  `void`
  `setOrbitHeadingPositive(boolean o)`
  Tell the camera to start/stop orbiting (for heading) in a positive direction.
  `void`
  `setOrbitInclineNegative(boolean o)`
  Tell the camera to start/stop orbiting (for incline) in a negative direction.
  `void`
  `setOrbitInclinePositive(boolean o)`
  Tell the camera to start/stop orbiting (for incline) in a positive direction.
  `void`
  `setTargetMovingBackwardCursor(boolean in_backward)`
  Tell the camera target to start/stop moving backward.
  `void`
  `setTargetMovingBackwardKey(boolean in_backward)`
  Tell the camera target to start/stop moving backward.
  `void`
  `setTargetMovingContinuousForward(double f)`
  Set the amount of continuous forward movement.
  `void`
  `setTargetMovingContinuousRight(double f)`
  Set the amount of continuous rightward movement.
  `void`
  `setTargetMovingDown(boolean in_down)`
  Tell the camera target to start/stop moving down.
  `void`
  `setTargetMovingForwardCursor(boolean in_forward)`
  Tell the camera target to start/stop moving forward.
  `void`
  `setTargetMovingForwardKey(boolean in_forward)`
  Tell the camera target to start/stop moving forward.
  `void`
  `setTargetMovingLeftCursor(boolean in_left)`
  Tell the camera target to start/stop moving left.
  `void`
  `setTargetMovingLeftKey(boolean in_left)`
  Tell the camera target to start/stop moving left.
  `void`
  `setTargetMovingRightCursor(boolean in_right)`
  Tell the camera target to start/stop moving right.
  `void`
  `setTargetMovingRightKey(boolean in_right)`
  Tell the camera target to start/stop moving right.
  `void`
  `setTargetMovingUp(boolean in_up)`
  Tell the camera target to start/stop moving up.
  `void`
  `setZoomingIn(boolean in_zoom_in)`
  Tell the camera target to start/stop zooming in.
  `void`
  `setZoomingOut(boolean in_zoom_out)`
  Tell the camera target to start/stop zooming out.
  `double`
  `takeTargetMovingForward()`
  Retrieve `r` = `JCameraSphericalInputType.getTargetMovingForwardContinuous()`, set the current forward movement to 0.0, and return `r`.
  `double`
  `takeTargetMovingRight()`
  Retrieve `r` = `JCameraSphericalInputType.getTargetMovingRight()`, set the current rightward movement to 0.0, and return `r`.

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

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

- ## Method Details

  - ### newInput

    public static JCameraSphericalInputType newInput()
    Returns:
      A new input

  - ### addTargetMovingContinuousForward

    public void addTargetMovingContinuousForward(double in_forward)
    Description copied from interface: `JCameraSphericalInputType`
    Add a movement forward to the target position. A negative value decreases the amount of movement forward and increases the amount of movement backward.
    Specified by:
      `addTargetMovingContinuousForward` in interface `JCameraSphericalInputType`
    Parameters:
      `in_forward` - The amount to move forward

  - ### addTargetMovingContinuousRight

    public void addTargetMovingContinuousRight(double in_right)
    Description copied from interface: `JCameraSphericalInputType`
    Add a movement right to the target position. A negative value decreases the amount of movement to the right and increases the amount of movement to the left.
    Specified by:
      `addTargetMovingContinuousRight` in interface `JCameraSphericalInputType`
    Parameters:
      `in_right` - The amount to move right

  - ### getForwardFactor

    public double getForwardFactor()
    Specified by:
      `getForwardFactor` in interface `JCameraSphericalInputType`
    Returns:
      The multiplication factor used for continuous forward/backward movement.

  - ### getRightFactor

    public double getRightFactor()
    Specified by:
      `getRightFactor` in interface `JCameraSphericalInputType`
    Returns:
      The multiplication factor used for continuous right/left movement.

  - ### getTargetMovingForwardContinuous

    public double getTargetMovingForwardContinuous()
    Specified by:
      `getTargetMovingForwardContinuous` in interface `JCameraSphericalInputType`
    Returns:
      The current forward movement.

  - ### getTargetMovingRight

    public double getTargetMovingRight()
    Specified by:
      `getTargetMovingRight` in interface `JCameraSphericalInputType`
    Returns:
      The current rightward movement.

  - ### isOrbitingHeadingNegative

    public boolean isOrbitingHeadingNegative()
    Specified by:
      `isOrbitingHeadingNegative` in interface `JCameraSphericalInputType`
    Returns:
      `true` if the user is telling the camera to orbit

  - ### isOrbitingHeadingPositive

    public boolean isOrbitingHeadingPositive()
    Specified by:
      `isOrbitingHeadingPositive` in interface `JCameraSphericalInputType`
    Returns:
      `true` if the user is telling the camera to orbit

  - ### isOrbitingInclineNegative

    public boolean isOrbitingInclineNegative()
    Specified by:
      `isOrbitingInclineNegative` in interface `JCameraSphericalInputType`
    Returns:
      `true` if the user is telling the camera to orbit

  - ### isOrbitingInclinePositive

    public boolean isOrbitingInclinePositive()
    Specified by:
      `isOrbitingInclinePositive` in interface `JCameraSphericalInputType`
    Returns:
      `true` if the user is telling the camera to orbit

  - ### isTargetMovingBackward

    public boolean isTargetMovingBackward()
    Specified by:
      `isTargetMovingBackward` in interface `JCameraSphericalInputType`
    Returns:
      `true` if the user is telling the camera target to move backward

  - ### isTargetMovingDown

    public boolean isTargetMovingDown()
    Specified by:
      `isTargetMovingDown` in interface `JCameraSphericalInputType`
    Returns:
      `true` if the user is telling the camera target to move down

  - ### setTargetMovingDown

    public void setTargetMovingDown(boolean in_down)
    Description copied from interface: `JCameraSphericalInputType`
    Tell the camera target to start/stop moving down.
    Specified by:
      `setTargetMovingDown` in interface `JCameraSphericalInputType`
    Parameters:
      `in_down` - `true` if the camera should be moving

  - ### isTargetMovingForward

    public boolean isTargetMovingForward()
    Specified by:
      `isTargetMovingForward` in interface `JCameraSphericalInputType`
    Returns:
      `true` if the user is telling the camera target to move forward

  - ### isTargetMovingLeft

    public boolean isTargetMovingLeft()
    Specified by:
      `isTargetMovingLeft` in interface `JCameraSphericalInputType`
    Returns:
      `true` if the user is telling the camera target to move left

  - ### isTargetMovingRight

    public boolean isTargetMovingRight()
    Specified by:
      `isTargetMovingRight` in interface `JCameraSphericalInputType`
    Returns:
      `true` if the user is telling the camera target to move right

  - ### isTargetMovingUp

    public boolean isTargetMovingUp()
    Specified by:
      `isTargetMovingUp` in interface `JCameraSphericalInputType`
    Returns:
      `true` if the user is telling the camera target to move up

  - ### setTargetMovingUp

    public void setTargetMovingUp(boolean in_up)
    Description copied from interface: `JCameraSphericalInputType`
    Tell the camera target to start/stop moving up.
    Specified by:
      `setTargetMovingUp` in interface `JCameraSphericalInputType`
    Parameters:
      `in_up` - `true` if the camera should be moving

  - ### isZoomingIn

    public boolean isZoomingIn()
    Specified by:
      `isZoomingIn` in interface `JCameraSphericalInputType`
    Returns:
      `true` if the user is telling the camera to zoom in

  - ### setZoomingIn

    public void setZoomingIn(boolean in_zoom_in)
    Description copied from interface: `JCameraSphericalInputType`
    Tell the camera target to start/stop zooming in.
    Specified by:
      `setZoomingIn` in interface `JCameraSphericalInputType`
    Parameters:
      `in_zoom_in` - `true` if the camera should be moving

  - ### isZoomingOut

    public boolean isZoomingOut()
    Specified by:
      `isZoomingOut` in interface `JCameraSphericalInputType`
    Returns:
      `true` if the user is telling the camera to zoom out

  - ### setZoomingOut

    public void setZoomingOut(boolean in_zoom_out)
    Description copied from interface: `JCameraSphericalInputType`
    Tell the camera target to start/stop zooming out.
    Specified by:
      `setZoomingOut` in interface `JCameraSphericalInputType`
    Parameters:
      `in_zoom_out` - `true` if the camera should be moving

  - ### setContinuousForwardFactor

    public void setContinuousForwardFactor(double f)
    Description copied from interface: `JCameraSphericalInputType`
    Set the multiplication factor used for continuous forward/backward movement.
    Specified by:
      `setContinuousForwardFactor` in interface `JCameraSphericalInputType`
    Parameters:
      `f` - The multiplication factor

  - ### setContinuousRightwardFactor

    public void setContinuousRightwardFactor(double f)
    Description copied from interface: `JCameraSphericalInputType`
    Set the multiplication factor used for continuous left/right movement.
    Specified by:
      `setContinuousRightwardFactor` in interface `JCameraSphericalInputType`
    Parameters:
      `f` - The multiplication factor

  - ### setOrbitHeadingNegative

    public void setOrbitHeadingNegative(boolean o)
    Description copied from interface: `JCameraSphericalInputType`
    Tell the camera to start/stop orbiting (for heading) in a negative direction.
    Specified by:
      `setOrbitHeadingNegative` in interface `JCameraSphericalInputType`
    Parameters:
      `o` - `true` if the camera should be moving

  - ### setOrbitHeadingPositive

    public void setOrbitHeadingPositive(boolean o)
    Description copied from interface: `JCameraSphericalInputType`
    Tell the camera to start/stop orbiting (for heading) in a positive direction.
    Specified by:
      `setOrbitHeadingPositive` in interface `JCameraSphericalInputType`
    Parameters:
      `o` - `true` if the camera should be moving

  - ### setOrbitInclineNegative

    public void setOrbitInclineNegative(boolean o)
    Description copied from interface: `JCameraSphericalInputType`
    Tell the camera to start/stop orbiting (for incline) in a negative direction.
    Specified by:
      `setOrbitInclineNegative` in interface `JCameraSphericalInputType`
    Parameters:
      `o` - `true` if the camera should be moving

  - ### setOrbitInclinePositive

    public void setOrbitInclinePositive(boolean o)
    Description copied from interface: `JCameraSphericalInputType`
    Tell the camera to start/stop orbiting (for incline) in a positive direction.
    Specified by:
      `setOrbitInclinePositive` in interface `JCameraSphericalInputType`
    Parameters:
      `o` - `true` if the camera should be moving

  - ### setTargetMovingBackwardCursor

    public void setTargetMovingBackwardCursor(boolean in_backward)
    Description copied from interface: `JCameraSphericalInputType`
    Tell the camera target to start/stop moving backward.
    Specified by:
      `setTargetMovingBackwardCursor` in interface `JCameraSphericalInputType`
    Parameters:
      `in_backward` - `true` if the camera should be moving

  - ### setTargetMovingBackwardKey

    public void setTargetMovingBackwardKey(boolean in_backward)
    Description copied from interface: `JCameraSphericalInputType`
    Tell the camera target to start/stop moving backward.
    Specified by:
      `setTargetMovingBackwardKey` in interface `JCameraSphericalInputType`
    Parameters:
      `in_backward` - `true` if the camera should be moving

  - ### setTargetMovingContinuousForward

    public void setTargetMovingContinuousForward(double f)
    Description copied from interface: `JCameraSphericalInputType`
    Set the amount of continuous forward movement.
    Specified by:
      `setTargetMovingContinuousForward` in interface `JCameraSphericalInputType`
    Parameters:
      `f` - The forward movement

  - ### setTargetMovingContinuousRight

    public void setTargetMovingContinuousRight(double f)
    Description copied from interface: `JCameraSphericalInputType`
    Set the amount of continuous rightward movement.
    Specified by:
      `setTargetMovingContinuousRight` in interface `JCameraSphericalInputType`
    Parameters:
      `f` - The rightward movement

  - ### setTargetMovingForwardCursor

    public void setTargetMovingForwardCursor(boolean in_forward)
    Description copied from interface: `JCameraSphericalInputType`
    Tell the camera target to start/stop moving forward.
    Specified by:
      `setTargetMovingForwardCursor` in interface `JCameraSphericalInputType`
    Parameters:
      `in_forward` - `true` if the camera should be moving

  - ### setTargetMovingForwardKey

    public void setTargetMovingForwardKey(boolean in_forward)
    Description copied from interface: `JCameraSphericalInputType`
    Tell the camera target to start/stop moving forward.
    Specified by:
      `setTargetMovingForwardKey` in interface `JCameraSphericalInputType`
    Parameters:
      `in_forward` - `true` if the camera should be moving

  - ### setTargetMovingLeftCursor

    public void setTargetMovingLeftCursor(boolean in_left)
    Description copied from interface: `JCameraSphericalInputType`
    Tell the camera target to start/stop moving left.
    Specified by:
      `setTargetMovingLeftCursor` in interface `JCameraSphericalInputType`
    Parameters:
      `in_left` - `true` if the camera should be moving

  - ### setTargetMovingLeftKey

    public void setTargetMovingLeftKey(boolean in_left)
    Description copied from interface: `JCameraSphericalInputType`
    Tell the camera target to start/stop moving left.
    Specified by:
      `setTargetMovingLeftKey` in interface `JCameraSphericalInputType`
    Parameters:
      `in_left` - `true` if the camera should be moving

  - ### setTargetMovingRightCursor

    public void setTargetMovingRightCursor(boolean in_right)
    Description copied from interface: `JCameraSphericalInputType`
    Tell the camera target to start/stop moving right.
    Specified by:
      `setTargetMovingRightCursor` in interface `JCameraSphericalInputType`
    Parameters:
      `in_right` - `true` if the camera should be moving

  - ### setTargetMovingRightKey

    public void setTargetMovingRightKey(boolean in_right)
    Description copied from interface: `JCameraSphericalInputType`
    Tell the camera target to start/stop moving right.
    Specified by:
      `setTargetMovingRightKey` in interface `JCameraSphericalInputType`
    Parameters:
      `in_right` - `true` if the camera should be moving

  - ### takeTargetMovingForward

    public double takeTargetMovingForward()
    Description copied from interface: `JCameraSphericalInputType`
    Retrieve `r` = `JCameraSphericalInputType.getTargetMovingForwardContinuous()`, set the current forward movement to 0.0, and return `r`.
    Specified by:
      `takeTargetMovingForward` in interface `JCameraSphericalInputType`
    Returns:
      The amount of forward movement.

  - ### takeTargetMovingRight

    public double takeTargetMovingRight()
    Description copied from interface: `JCameraSphericalInputType`
    Retrieve `r` = `JCameraSphericalInputType.getTargetMovingRight()`, set the current rightward movement to 0.0, and return `r`.
    Specified by:
      `takeTargetMovingRight` in interface `JCameraSphericalInputType`
    Returns:
      The amount of rightward movement.