@EqualityReference public final class JCameraFPSStyleInput extends Object implements JCameraFPSStyleInputType
An input for an fps-style camera.
It is safe to access values of this type from multiple threads.
| Modifier and Type | Method and Description |
|---|---|
void |
addRotationAroundHorizontal(double r)
Add a rotation around the horizontal axis.
|
void |
addRotationAroundVertical(double r)
Add a rotation around the vertical axis.
|
double |
getRotationHorizontal() |
double |
getRotationVertical() |
boolean |
isMovingBackward() |
boolean |
isMovingDown() |
boolean |
isMovingForward() |
boolean |
isMovingLeft() |
boolean |
isMovingRight() |
boolean |
isMovingUp() |
static JCameraFPSStyleInputType |
newInput() |
void |
setMovingBackward(boolean in_backward)
Tell the camera to start/stop moving backward.
|
void |
setMovingDown(boolean in_down)
Tell the camera to start/stop moving down.
|
void |
setMovingForward(boolean in_forward)
Tell the camera to start/stop moving forward.
|
void |
setMovingLeft(boolean in_left)
Tell the camera to start/stop moving left.
|
void |
setMovingRight(boolean in_right)
Tell the camera to start/stop moving right.
|
void |
setMovingUp(boolean in_up)
Tell the camera to start/stop moving up.
|
void |
setRotationHorizontal(double r)
Set the horizontal rotation.
|
void |
setRotationHorizontalFactor(double f)
Set the horizontal rotation factor.
|
void |
setRotationVertical(double r)
Set the vertical rotation.
|
void |
setRotationVerticalFactor(double f)
Set the vertical rotation factor.
|
double |
takeRotationHorizontal()
Return
JCameraFPSStyleInputType.getRotationHorizontal(), setting the rotation to 0.0. |
double |
takeRotationVertical()
Return
JCameraFPSStyleInputType.getRotationVertical(), setting the rotation to 0.0. |
String |
toString() |
public static JCameraFPSStyleInputType newInput()
public void addRotationAroundHorizontal(double r)
JCameraFPSStyleInputTypeaddRotationAroundHorizontal in interface JCameraFPSStyleInputTyper - The rotation amountpublic void addRotationAroundVertical(double r)
JCameraFPSStyleInputTypeaddRotationAroundVertical in interface JCameraFPSStyleInputTyper - The rotation amountpublic double getRotationHorizontal()
getRotationHorizontal in interface JCameraFPSStyleInputTypepublic void setRotationHorizontal(double r)
JCameraFPSStyleInputTypesetRotationHorizontal in interface JCameraFPSStyleInputTyper - The rotationpublic double getRotationVertical()
getRotationVertical in interface JCameraFPSStyleInputTypepublic void setRotationVertical(double r)
JCameraFPSStyleInputTypesetRotationVertical in interface JCameraFPSStyleInputTyper - The rotationpublic boolean isMovingBackward()
isMovingBackward in interface JCameraFPSStyleInputTypetrue if the user is telling the camera to move backwardpublic void setMovingBackward(boolean in_backward)
JCameraFPSStyleInputTypesetMovingBackward in interface JCameraFPSStyleInputTypein_backward - true if the camera should be movingpublic boolean isMovingDown()
isMovingDown in interface JCameraFPSStyleInputTypetrue if the user is telling the camera to move downpublic void setMovingDown(boolean in_down)
JCameraFPSStyleInputTypesetMovingDown in interface JCameraFPSStyleInputTypein_down - true if the camera should be movingpublic boolean isMovingForward()
isMovingForward in interface JCameraFPSStyleInputTypetrue if the user is telling the camera to move forwardpublic void setMovingForward(boolean in_forward)
JCameraFPSStyleInputTypesetMovingForward in interface JCameraFPSStyleInputTypein_forward - true if the camera should be movingpublic boolean isMovingLeft()
isMovingLeft in interface JCameraFPSStyleInputTypetrue if the user is telling the camera to move leftpublic void setMovingLeft(boolean in_left)
JCameraFPSStyleInputTypesetMovingLeft in interface JCameraFPSStyleInputTypein_left - true if the camera should be movingpublic boolean isMovingRight()
isMovingRight in interface JCameraFPSStyleInputTypetrue if the user is telling the camera to move rightpublic void setMovingRight(boolean in_right)
JCameraFPSStyleInputTypesetMovingRight in interface JCameraFPSStyleInputTypein_right - true if the camera should be movingpublic boolean isMovingUp()
isMovingUp in interface JCameraFPSStyleInputTypetrue if the user is telling the camera to move uppublic void setMovingUp(boolean in_up)
JCameraFPSStyleInputTypesetMovingUp in interface JCameraFPSStyleInputTypein_up - true if the camera should be movingpublic void setRotationHorizontalFactor(double f)
JCameraFPSStyleInputTypesetRotationHorizontalFactor in interface JCameraFPSStyleInputTypef - The rotation factorpublic void setRotationVerticalFactor(double f)
JCameraFPSStyleInputTypesetRotationVerticalFactor in interface JCameraFPSStyleInputTypef - The rotation factorpublic double takeRotationHorizontal()
JCameraFPSStyleInputTypeJCameraFPSStyleInputType.getRotationHorizontal(), setting the rotation to 0.0.takeRotationHorizontal in interface JCameraFPSStyleInputTypepublic double takeRotationVertical()
JCameraFPSStyleInputTypeJCameraFPSStyleInputType.getRotationVertical(), setting the rotation to 0.0.takeRotationVertical in interface JCameraFPSStyleInputTypeCopyright © 2017 <code@io7m.com> http://io7m.com