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 TypeMethodDescriptionvoidaddTargetMovingContinuousForward(double in_forward) Add a movement forward to the target position.voidaddTargetMovingContinuousRight(double in_right) Add a movement right to the target position.doubledoubledoubledoublebooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanstatic JCameraSphericalInputTypenewInput()voidsetContinuousForwardFactor(double f) Set the multiplication factor used for continuous forward/backward movement.voidsetContinuousRightwardFactor(double f) Set the multiplication factor used for continuous left/right movement.voidsetOrbitHeadingNegative(boolean o) Tell the camera to start/stop orbiting (for heading) in a negative direction.voidsetOrbitHeadingPositive(boolean o) Tell the camera to start/stop orbiting (for heading) in a positive direction.voidsetOrbitInclineNegative(boolean o) Tell the camera to start/stop orbiting (for incline) in a negative direction.voidsetOrbitInclinePositive(boolean o) Tell the camera to start/stop orbiting (for incline) in a positive direction.voidsetTargetMovingBackwardCursor(boolean in_backward) Tell the camera target to start/stop moving backward.voidsetTargetMovingBackwardKey(boolean in_backward) Tell the camera target to start/stop moving backward.voidsetTargetMovingContinuousForward(double f) Set the amount of continuous forward movement.voidsetTargetMovingContinuousRight(double f) Set the amount of continuous rightward movement.voidsetTargetMovingDown(boolean in_down) Tell the camera target to start/stop moving down.voidsetTargetMovingForwardCursor(boolean in_forward) Tell the camera target to start/stop moving forward.voidsetTargetMovingForwardKey(boolean in_forward) Tell the camera target to start/stop moving forward.voidsetTargetMovingLeftCursor(boolean in_left) Tell the camera target to start/stop moving left.voidsetTargetMovingLeftKey(boolean in_left) Tell the camera target to start/stop moving left.voidsetTargetMovingRightCursor(boolean in_right) Tell the camera target to start/stop moving right.voidsetTargetMovingRightKey(boolean in_right) Tell the camera target to start/stop moving right.voidsetTargetMovingUp(boolean in_up) Tell the camera target to start/stop moving up.voidsetZoomingIn(boolean in_zoom_in) Tell the camera target to start/stop zooming in.voidsetZoomingOut(boolean in_zoom_out) Tell the camera target to start/stop zooming out.doubleRetriever=JCameraSphericalInputType.getTargetMovingForwardContinuous(), set the current forward movement to 0.0, and returnr.doubleRetriever=JCameraSphericalInputType.getTargetMovingRight(), set the current rightward movement to 0.0, and returnr.
-
Method Details
-
newInput
- Returns:
- A new input
-
addTargetMovingContinuousForward
public void addTargetMovingContinuousForward(double in_forward) Description copied from interface:JCameraSphericalInputTypeAdd 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:
addTargetMovingContinuousForwardin interfaceJCameraSphericalInputType- Parameters:
in_forward- The amount to move forward
-
addTargetMovingContinuousRight
public void addTargetMovingContinuousRight(double in_right) Description copied from interface:JCameraSphericalInputTypeAdd 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:
addTargetMovingContinuousRightin interfaceJCameraSphericalInputType- Parameters:
in_right- The amount to move right
-
getForwardFactor
public double getForwardFactor()- Specified by:
getForwardFactorin interfaceJCameraSphericalInputType- Returns:
- The multiplication factor used for continuous forward/backward movement.
-
getRightFactor
public double getRightFactor()- Specified by:
getRightFactorin interfaceJCameraSphericalInputType- Returns:
- The multiplication factor used for continuous right/left movement.
-
getTargetMovingForwardContinuous
public double getTargetMovingForwardContinuous()- Specified by:
getTargetMovingForwardContinuousin interfaceJCameraSphericalInputType- Returns:
- The current forward movement.
-
getTargetMovingRight
public double getTargetMovingRight()- Specified by:
getTargetMovingRightin interfaceJCameraSphericalInputType- Returns:
- The current rightward movement.
-
isOrbitingHeadingNegative
public boolean isOrbitingHeadingNegative()- Specified by:
isOrbitingHeadingNegativein interfaceJCameraSphericalInputType- Returns:
trueif the user is telling the camera to orbit
-
isOrbitingHeadingPositive
public boolean isOrbitingHeadingPositive()- Specified by:
isOrbitingHeadingPositivein interfaceJCameraSphericalInputType- Returns:
trueif the user is telling the camera to orbit
-
isOrbitingInclineNegative
public boolean isOrbitingInclineNegative()- Specified by:
isOrbitingInclineNegativein interfaceJCameraSphericalInputType- Returns:
trueif the user is telling the camera to orbit
-
isOrbitingInclinePositive
public boolean isOrbitingInclinePositive()- Specified by:
isOrbitingInclinePositivein interfaceJCameraSphericalInputType- Returns:
trueif the user is telling the camera to orbit
-
isTargetMovingBackward
public boolean isTargetMovingBackward()- Specified by:
isTargetMovingBackwardin interfaceJCameraSphericalInputType- Returns:
trueif the user is telling the camera target to move backward
-
isTargetMovingDown
public boolean isTargetMovingDown()- Specified by:
isTargetMovingDownin interfaceJCameraSphericalInputType- Returns:
trueif the user is telling the camera target to move down
-
setTargetMovingDown
public void setTargetMovingDown(boolean in_down) Description copied from interface:JCameraSphericalInputTypeTell the camera target to start/stop moving down.- Specified by:
setTargetMovingDownin interfaceJCameraSphericalInputType- Parameters:
in_down-trueif the camera should be moving
-
isTargetMovingForward
public boolean isTargetMovingForward()- Specified by:
isTargetMovingForwardin interfaceJCameraSphericalInputType- Returns:
trueif the user is telling the camera target to move forward
-
isTargetMovingLeft
public boolean isTargetMovingLeft()- Specified by:
isTargetMovingLeftin interfaceJCameraSphericalInputType- Returns:
trueif the user is telling the camera target to move left
-
isTargetMovingRight
public boolean isTargetMovingRight()- Specified by:
isTargetMovingRightin interfaceJCameraSphericalInputType- Returns:
trueif the user is telling the camera target to move right
-
isTargetMovingUp
public boolean isTargetMovingUp()- Specified by:
isTargetMovingUpin interfaceJCameraSphericalInputType- Returns:
trueif the user is telling the camera target to move up
-
setTargetMovingUp
public void setTargetMovingUp(boolean in_up) Description copied from interface:JCameraSphericalInputTypeTell the camera target to start/stop moving up.- Specified by:
setTargetMovingUpin interfaceJCameraSphericalInputType- Parameters:
in_up-trueif the camera should be moving
-
isZoomingIn
public boolean isZoomingIn()- Specified by:
isZoomingInin interfaceJCameraSphericalInputType- Returns:
trueif the user is telling the camera to zoom in
-
setZoomingIn
public void setZoomingIn(boolean in_zoom_in) Description copied from interface:JCameraSphericalInputTypeTell the camera target to start/stop zooming in.- Specified by:
setZoomingInin interfaceJCameraSphericalInputType- Parameters:
in_zoom_in-trueif the camera should be moving
-
isZoomingOut
public boolean isZoomingOut()- Specified by:
isZoomingOutin interfaceJCameraSphericalInputType- Returns:
trueif the user is telling the camera to zoom out
-
setZoomingOut
public void setZoomingOut(boolean in_zoom_out) Description copied from interface:JCameraSphericalInputTypeTell the camera target to start/stop zooming out.- Specified by:
setZoomingOutin interfaceJCameraSphericalInputType- Parameters:
in_zoom_out-trueif the camera should be moving
-
setContinuousForwardFactor
public void setContinuousForwardFactor(double f) Description copied from interface:JCameraSphericalInputTypeSet the multiplication factor used for continuous forward/backward movement.- Specified by:
setContinuousForwardFactorin interfaceJCameraSphericalInputType- Parameters:
f- The multiplication factor
-
setContinuousRightwardFactor
public void setContinuousRightwardFactor(double f) Description copied from interface:JCameraSphericalInputTypeSet the multiplication factor used for continuous left/right movement.- Specified by:
setContinuousRightwardFactorin interfaceJCameraSphericalInputType- Parameters:
f- The multiplication factor
-
setOrbitHeadingNegative
public void setOrbitHeadingNegative(boolean o) Description copied from interface:JCameraSphericalInputTypeTell the camera to start/stop orbiting (for heading) in a negative direction.- Specified by:
setOrbitHeadingNegativein interfaceJCameraSphericalInputType- Parameters:
o-trueif the camera should be moving
-
setOrbitHeadingPositive
public void setOrbitHeadingPositive(boolean o) Description copied from interface:JCameraSphericalInputTypeTell the camera to start/stop orbiting (for heading) in a positive direction.- Specified by:
setOrbitHeadingPositivein interfaceJCameraSphericalInputType- Parameters:
o-trueif the camera should be moving
-
setOrbitInclineNegative
public void setOrbitInclineNegative(boolean o) Description copied from interface:JCameraSphericalInputTypeTell the camera to start/stop orbiting (for incline) in a negative direction.- Specified by:
setOrbitInclineNegativein interfaceJCameraSphericalInputType- Parameters:
o-trueif the camera should be moving
-
setOrbitInclinePositive
public void setOrbitInclinePositive(boolean o) Description copied from interface:JCameraSphericalInputTypeTell the camera to start/stop orbiting (for incline) in a positive direction.- Specified by:
setOrbitInclinePositivein interfaceJCameraSphericalInputType- Parameters:
o-trueif the camera should be moving
-
setTargetMovingBackwardCursor
public void setTargetMovingBackwardCursor(boolean in_backward) Description copied from interface:JCameraSphericalInputTypeTell the camera target to start/stop moving backward.- Specified by:
setTargetMovingBackwardCursorin interfaceJCameraSphericalInputType- Parameters:
in_backward-trueif the camera should be moving
-
setTargetMovingBackwardKey
public void setTargetMovingBackwardKey(boolean in_backward) Description copied from interface:JCameraSphericalInputTypeTell the camera target to start/stop moving backward.- Specified by:
setTargetMovingBackwardKeyin interfaceJCameraSphericalInputType- Parameters:
in_backward-trueif the camera should be moving
-
setTargetMovingContinuousForward
public void setTargetMovingContinuousForward(double f) Description copied from interface:JCameraSphericalInputTypeSet the amount of continuous forward movement.- Specified by:
setTargetMovingContinuousForwardin interfaceJCameraSphericalInputType- Parameters:
f- The forward movement
-
setTargetMovingContinuousRight
public void setTargetMovingContinuousRight(double f) Description copied from interface:JCameraSphericalInputTypeSet the amount of continuous rightward movement.- Specified by:
setTargetMovingContinuousRightin interfaceJCameraSphericalInputType- Parameters:
f- The rightward movement
-
setTargetMovingForwardCursor
public void setTargetMovingForwardCursor(boolean in_forward) Description copied from interface:JCameraSphericalInputTypeTell the camera target to start/stop moving forward.- Specified by:
setTargetMovingForwardCursorin interfaceJCameraSphericalInputType- Parameters:
in_forward-trueif the camera should be moving
-
setTargetMovingForwardKey
public void setTargetMovingForwardKey(boolean in_forward) Description copied from interface:JCameraSphericalInputTypeTell the camera target to start/stop moving forward.- Specified by:
setTargetMovingForwardKeyin interfaceJCameraSphericalInputType- Parameters:
in_forward-trueif the camera should be moving
-
setTargetMovingLeftCursor
public void setTargetMovingLeftCursor(boolean in_left) Description copied from interface:JCameraSphericalInputTypeTell the camera target to start/stop moving left.- Specified by:
setTargetMovingLeftCursorin interfaceJCameraSphericalInputType- Parameters:
in_left-trueif the camera should be moving
-
setTargetMovingLeftKey
public void setTargetMovingLeftKey(boolean in_left) Description copied from interface:JCameraSphericalInputTypeTell the camera target to start/stop moving left.- Specified by:
setTargetMovingLeftKeyin interfaceJCameraSphericalInputType- Parameters:
in_left-trueif the camera should be moving
-
setTargetMovingRightCursor
public void setTargetMovingRightCursor(boolean in_right) Description copied from interface:JCameraSphericalInputTypeTell the camera target to start/stop moving right.- Specified by:
setTargetMovingRightCursorin interfaceJCameraSphericalInputType- Parameters:
in_right-trueif the camera should be moving
-
setTargetMovingRightKey
public void setTargetMovingRightKey(boolean in_right) Description copied from interface:JCameraSphericalInputTypeTell the camera target to start/stop moving right.- Specified by:
setTargetMovingRightKeyin interfaceJCameraSphericalInputType- Parameters:
in_right-trueif the camera should be moving
-
takeTargetMovingForward
public double takeTargetMovingForward()Description copied from interface:JCameraSphericalInputTypeRetriever=JCameraSphericalInputType.getTargetMovingForwardContinuous(), set the current forward movement to 0.0, and returnr.- Specified by:
takeTargetMovingForwardin interfaceJCameraSphericalInputType- Returns:
- The amount of forward movement.
-
takeTargetMovingRight
public double takeTargetMovingRight()Description copied from interface:JCameraSphericalInputTypeRetriever=JCameraSphericalInputType.getTargetMovingRight(), set the current rightward movement to 0.0, and returnr.- Specified by:
takeTargetMovingRightin interfaceJCameraSphericalInputType- Returns:
- The amount of rightward movement.
-