@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.
| Modifier and Type | Method and Description |
|---|---|
void |
addTargetMovingContinuousForward(float in_forward)
Add a movement forward to the target position.
|
void |
addTargetMovingContinuousRight(float in_right)
Add a movement right to the target position.
|
float |
getForwardFactor() |
float |
getRightFactor() |
float |
getTargetMovingForwardContinuous() |
float |
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(float f)
Set the multiplication factor used for continuous forward/backward
movement.
|
void |
setContinuousRightwardFactor(float 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(float f)
Set the amount of continuous forward movement.
|
void |
setTargetMovingContinuousRight(float 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.
|
float |
takeTargetMovingForward()
Retrieve
r = JCameraSphericalInputType.getTargetMovingForwardContinuous(), set the
current forward movement to 0.0, and return r. |
float |
takeTargetMovingRight()
Retrieve
r = JCameraSphericalInputType.getTargetMovingRight(), set the current
rightward movement to 0.0, and return r. |
public static JCameraSphericalInputType newInput()
public void addTargetMovingContinuousForward(float in_forward)
JCameraSphericalInputTypeaddTargetMovingContinuousForward in interface JCameraSphericalInputTypein_forward - The amount to move forwardpublic void addTargetMovingContinuousRight(float in_right)
JCameraSphericalInputTypeaddTargetMovingContinuousRight in interface JCameraSphericalInputTypein_right - The amount to move rightpublic float getForwardFactor()
getForwardFactor in interface JCameraSphericalInputTypepublic float getRightFactor()
getRightFactor in interface JCameraSphericalInputTypepublic float getTargetMovingForwardContinuous()
getTargetMovingForwardContinuous in interface JCameraSphericalInputTypepublic float getTargetMovingRight()
getTargetMovingRight in interface JCameraSphericalInputTypepublic boolean isOrbitingHeadingNegative()
isOrbitingHeadingNegative in interface JCameraSphericalInputTypetrue if the user is telling the camera to orbitpublic boolean isOrbitingHeadingPositive()
isOrbitingHeadingPositive in interface JCameraSphericalInputTypetrue if the user is telling the camera to orbitpublic boolean isOrbitingInclineNegative()
isOrbitingInclineNegative in interface JCameraSphericalInputTypetrue if the user is telling the camera to orbitpublic boolean isOrbitingInclinePositive()
isOrbitingInclinePositive in interface JCameraSphericalInputTypetrue if the user is telling the camera to orbitpublic boolean isTargetMovingBackward()
isTargetMovingBackward in interface JCameraSphericalInputTypetrue if the user is telling the camera target to move
backwardpublic boolean isTargetMovingDown()
isTargetMovingDown in interface JCameraSphericalInputTypetrue if the user is telling the camera target to move downpublic void setTargetMovingDown(boolean in_down)
JCameraSphericalInputTypesetTargetMovingDown in interface JCameraSphericalInputTypein_down - true if the camera should be movingpublic boolean isTargetMovingForward()
isTargetMovingForward in interface JCameraSphericalInputTypetrue if the user is telling the camera target to move
forwardpublic boolean isTargetMovingLeft()
isTargetMovingLeft in interface JCameraSphericalInputTypetrue if the user is telling the camera target to move leftpublic boolean isTargetMovingRight()
isTargetMovingRight in interface JCameraSphericalInputTypetrue if the user is telling the camera target to move rightpublic boolean isTargetMovingUp()
isTargetMovingUp in interface JCameraSphericalInputTypetrue if the user is telling the camera target to move uppublic void setTargetMovingUp(boolean in_up)
JCameraSphericalInputTypesetTargetMovingUp in interface JCameraSphericalInputTypein_up - true if the camera should be movingpublic boolean isZoomingIn()
isZoomingIn in interface JCameraSphericalInputTypetrue if the user is telling the camera to zoom inpublic void setZoomingIn(boolean in_zoom_in)
JCameraSphericalInputTypesetZoomingIn in interface JCameraSphericalInputTypein_zoom_in - true if the camera should be movingpublic boolean isZoomingOut()
isZoomingOut in interface JCameraSphericalInputTypetrue if the user is telling the camera to zoom outpublic void setZoomingOut(boolean in_zoom_out)
JCameraSphericalInputTypesetZoomingOut in interface JCameraSphericalInputTypein_zoom_out - true if the camera should be movingpublic void setContinuousForwardFactor(float f)
JCameraSphericalInputTypesetContinuousForwardFactor in interface JCameraSphericalInputTypef - The multiplication factorpublic void setContinuousRightwardFactor(float f)
JCameraSphericalInputTypesetContinuousRightwardFactor in interface JCameraSphericalInputTypef - The multiplication factorpublic void setOrbitHeadingNegative(boolean o)
JCameraSphericalInputTypesetOrbitHeadingNegative in interface JCameraSphericalInputTypeo - true if the camera should be movingpublic void setOrbitHeadingPositive(boolean o)
JCameraSphericalInputTypesetOrbitHeadingPositive in interface JCameraSphericalInputTypeo - true if the camera should be movingpublic void setOrbitInclineNegative(boolean o)
JCameraSphericalInputTypesetOrbitInclineNegative in interface JCameraSphericalInputTypeo - true if the camera should be movingpublic void setOrbitInclinePositive(boolean o)
JCameraSphericalInputTypesetOrbitInclinePositive in interface JCameraSphericalInputTypeo - true if the camera should be movingpublic void setTargetMovingBackwardCursor(boolean in_backward)
JCameraSphericalInputTypesetTargetMovingBackwardCursor in interface JCameraSphericalInputTypein_backward - true if the camera should be movingpublic void setTargetMovingBackwardKey(boolean in_backward)
JCameraSphericalInputTypesetTargetMovingBackwardKey in interface JCameraSphericalInputTypein_backward - true if the camera should be movingpublic void setTargetMovingContinuousForward(float f)
JCameraSphericalInputTypesetTargetMovingContinuousForward in interface JCameraSphericalInputTypef - The forward movementpublic void setTargetMovingContinuousRight(float f)
JCameraSphericalInputTypesetTargetMovingContinuousRight in interface JCameraSphericalInputTypef - The rightward movementpublic void setTargetMovingForwardCursor(boolean in_forward)
JCameraSphericalInputTypesetTargetMovingForwardCursor in interface JCameraSphericalInputTypein_forward - true if the camera should be movingpublic void setTargetMovingForwardKey(boolean in_forward)
JCameraSphericalInputTypesetTargetMovingForwardKey in interface JCameraSphericalInputTypein_forward - true if the camera should be movingpublic void setTargetMovingLeftCursor(boolean in_left)
JCameraSphericalInputTypesetTargetMovingLeftCursor in interface JCameraSphericalInputTypein_left - true if the camera should be movingpublic void setTargetMovingLeftKey(boolean in_left)
JCameraSphericalInputTypesetTargetMovingLeftKey in interface JCameraSphericalInputTypein_left - true if the camera should be movingpublic void setTargetMovingRightCursor(boolean in_right)
JCameraSphericalInputTypesetTargetMovingRightCursor in interface JCameraSphericalInputTypein_right - true if the camera should be movingpublic void setTargetMovingRightKey(boolean in_right)
JCameraSphericalInputTypesetTargetMovingRightKey in interface JCameraSphericalInputTypein_right - true if the camera should be movingpublic float takeTargetMovingForward()
JCameraSphericalInputTyper = JCameraSphericalInputType.getTargetMovingForwardContinuous(), set the
current forward movement to 0.0, and return r.takeTargetMovingForward in interface JCameraSphericalInputTypepublic float takeTargetMovingRight()
JCameraSphericalInputTyper = JCameraSphericalInputType.getTargetMovingRight(), set the current
rightward movement to 0.0, and return r.takeTargetMovingRight in interface JCameraSphericalInputTypeCopyright © 2016 <code@io7m.com> http://io7m.com