@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(float r)
Add a rotation around the horizontal axis.
|
void |
addRotationAroundVertical(float r)
Add a rotation around the vertical axis.
|
float |
getRotationHorizontal() |
float |
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(float r)
Set the horizontal rotation.
|
void |
setRotationHorizontalFactor(float f)
Set the horizontal rotation factor.
|
void |
setRotationVertical(float r)
Set the vertical rotation.
|
void |
setRotationVerticalFactor(float f)
Set the vertical rotation factor.
|
float |
takeRotationHorizontal()
Return
JCameraFPSStyleInputType.getRotationHorizontal(), setting the rotation to 0.0. |
float |
takeRotationVertical()
Return
JCameraFPSStyleInputType.getRotationVertical(), setting the rotation to 0.0. |
String |
toString() |
public static JCameraFPSStyleInputType newInput()
public void addRotationAroundHorizontal(float r)
JCameraFPSStyleInputTypeaddRotationAroundHorizontal in interface JCameraFPSStyleInputTyper - The rotation amountpublic void addRotationAroundVertical(float r)
JCameraFPSStyleInputTypeaddRotationAroundVertical in interface JCameraFPSStyleInputTyper - The rotation amountpublic float getRotationHorizontal()
getRotationHorizontal in interface JCameraFPSStyleInputTypepublic void setRotationHorizontal(float r)
JCameraFPSStyleInputTypesetRotationHorizontal in interface JCameraFPSStyleInputTyper - The rotationpublic float getRotationVertical()
getRotationVertical in interface JCameraFPSStyleInputTypepublic void setRotationVertical(float 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(float f)
JCameraFPSStyleInputTypesetRotationHorizontalFactor in interface JCameraFPSStyleInputTypef - The rotation factorpublic void setRotationVerticalFactor(float f)
JCameraFPSStyleInputTypesetRotationVerticalFactor in interface JCameraFPSStyleInputTypef - The rotation factorpublic float takeRotationHorizontal()
JCameraFPSStyleInputTypeJCameraFPSStyleInputType.getRotationHorizontal(), setting the rotation to 0.0.takeRotationHorizontal in interface JCameraFPSStyleInputTypepublic float takeRotationVertical()
JCameraFPSStyleInputTypeJCameraFPSStyleInputType.getRotationVertical(), setting the rotation to 0.0.takeRotationVertical in interface JCameraFPSStyleInputTypeCopyright © 2016 <code@io7m.com> http://io7m.com