Package com.io7m.jcamera
Class JCameraFPSStyleInput
java.lang.Object
com.io7m.jcamera.JCameraFPSStyleInput
- All Implemented Interfaces:
JCameraFPSStyleInputType
@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.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddRotationAroundHorizontal(double r) Add a rotation around the horizontal axis.voidaddRotationAroundVertical(double r) Add a rotation around the vertical axis.doubledoublebooleanbooleanbooleanbooleanbooleanbooleanstatic JCameraFPSStyleInputTypenewInput()voidsetMovingBackward(boolean in_backward) Tell the camera to start/stop moving backward.voidsetMovingDown(boolean in_down) Tell the camera to start/stop moving down.voidsetMovingForward(boolean in_forward) Tell the camera to start/stop moving forward.voidsetMovingLeft(boolean in_left) Tell the camera to start/stop moving left.voidsetMovingRight(boolean in_right) Tell the camera to start/stop moving right.voidsetMovingUp(boolean in_up) Tell the camera to start/stop moving up.voidsetRotationHorizontal(double r) Set the horizontal rotation.voidsetRotationHorizontalFactor(double f) Set the horizontal rotation factor.voidsetRotationVertical(double r) Set the vertical rotation.voidsetRotationVerticalFactor(double f) Set the vertical rotation factor.doubleReturnJCameraFPSStyleInputType.getRotationHorizontal(), setting the rotation to 0.0.doubleReturnJCameraFPSStyleInputType.getRotationVertical(), setting the rotation to 0.0.toString()
-
Method Details
-
newInput
- Returns:
- A new input
-
addRotationAroundHorizontal
public void addRotationAroundHorizontal(double r) Description copied from interface:JCameraFPSStyleInputTypeAdd a rotation around the horizontal axis.- Specified by:
addRotationAroundHorizontalin interfaceJCameraFPSStyleInputType- Parameters:
r- The rotation amount
-
addRotationAroundVertical
public void addRotationAroundVertical(double r) Description copied from interface:JCameraFPSStyleInputTypeAdd a rotation around the vertical axis.- Specified by:
addRotationAroundVerticalin interfaceJCameraFPSStyleInputType- Parameters:
r- The rotation amount
-
getRotationHorizontal
public double getRotationHorizontal()- Specified by:
getRotationHorizontalin interfaceJCameraFPSStyleInputType- Returns:
- The current horizontal rotation coefficient.
-
setRotationHorizontal
public void setRotationHorizontal(double r) Description copied from interface:JCameraFPSStyleInputTypeSet the horizontal rotation.- Specified by:
setRotationHorizontalin interfaceJCameraFPSStyleInputType- Parameters:
r- The rotation
-
getRotationVertical
public double getRotationVertical()- Specified by:
getRotationVerticalin interfaceJCameraFPSStyleInputType- Returns:
- The current vertical rotation coefficient.
-
setRotationVertical
public void setRotationVertical(double r) Description copied from interface:JCameraFPSStyleInputTypeSet the vertical rotation.- Specified by:
setRotationVerticalin interfaceJCameraFPSStyleInputType- Parameters:
r- The rotation
-
isMovingBackward
public boolean isMovingBackward()- Specified by:
isMovingBackwardin interfaceJCameraFPSStyleInputType- Returns:
trueif the user is telling the camera to move backward
-
setMovingBackward
public void setMovingBackward(boolean in_backward) Description copied from interface:JCameraFPSStyleInputTypeTell the camera to start/stop moving backward.- Specified by:
setMovingBackwardin interfaceJCameraFPSStyleInputType- Parameters:
in_backward-trueif the camera should be moving
-
isMovingDown
public boolean isMovingDown()- Specified by:
isMovingDownin interfaceJCameraFPSStyleInputType- Returns:
trueif the user is telling the camera to move down
-
setMovingDown
public void setMovingDown(boolean in_down) Description copied from interface:JCameraFPSStyleInputTypeTell the camera to start/stop moving down.- Specified by:
setMovingDownin interfaceJCameraFPSStyleInputType- Parameters:
in_down-trueif the camera should be moving
-
isMovingForward
public boolean isMovingForward()- Specified by:
isMovingForwardin interfaceJCameraFPSStyleInputType- Returns:
trueif the user is telling the camera to move forward
-
setMovingForward
public void setMovingForward(boolean in_forward) Description copied from interface:JCameraFPSStyleInputTypeTell the camera to start/stop moving forward.- Specified by:
setMovingForwardin interfaceJCameraFPSStyleInputType- Parameters:
in_forward-trueif the camera should be moving
-
isMovingLeft
public boolean isMovingLeft()- Specified by:
isMovingLeftin interfaceJCameraFPSStyleInputType- Returns:
trueif the user is telling the camera to move left
-
setMovingLeft
public void setMovingLeft(boolean in_left) Description copied from interface:JCameraFPSStyleInputTypeTell the camera to start/stop moving left.- Specified by:
setMovingLeftin interfaceJCameraFPSStyleInputType- Parameters:
in_left-trueif the camera should be moving
-
isMovingRight
public boolean isMovingRight()- Specified by:
isMovingRightin interfaceJCameraFPSStyleInputType- Returns:
trueif the user is telling the camera to move right
-
setMovingRight
public void setMovingRight(boolean in_right) Description copied from interface:JCameraFPSStyleInputTypeTell the camera to start/stop moving right.- Specified by:
setMovingRightin interfaceJCameraFPSStyleInputType- Parameters:
in_right-trueif the camera should be moving
-
isMovingUp
public boolean isMovingUp()- Specified by:
isMovingUpin interfaceJCameraFPSStyleInputType- Returns:
trueif the user is telling the camera to move up
-
setMovingUp
public void setMovingUp(boolean in_up) Description copied from interface:JCameraFPSStyleInputTypeTell the camera to start/stop moving up.- Specified by:
setMovingUpin interfaceJCameraFPSStyleInputType- Parameters:
in_up-trueif the camera should be moving
-
setRotationHorizontalFactor
public void setRotationHorizontalFactor(double f) Description copied from interface:JCameraFPSStyleInputTypeSet the horizontal rotation factor.- Specified by:
setRotationHorizontalFactorin interfaceJCameraFPSStyleInputType- Parameters:
f- The rotation factor
-
setRotationVerticalFactor
public void setRotationVerticalFactor(double f) Description copied from interface:JCameraFPSStyleInputTypeSet the vertical rotation factor.- Specified by:
setRotationVerticalFactorin interfaceJCameraFPSStyleInputType- Parameters:
f- The rotation factor
-
takeRotationHorizontal
public double takeRotationHorizontal()Description copied from interface:JCameraFPSStyleInputTypeReturnJCameraFPSStyleInputType.getRotationHorizontal(), setting the rotation to 0.0.- Specified by:
takeRotationHorizontalin interfaceJCameraFPSStyleInputType- Returns:
- The current horizontal rotation coefficient.
-
takeRotationVertical
public double takeRotationVertical()Description copied from interface:JCameraFPSStyleInputTypeReturnJCameraFPSStyleInputType.getRotationVertical(), setting the rotation to 0.0.- Specified by:
takeRotationVerticalin interfaceJCameraFPSStyleInputType- Returns:
- The current vertical rotation coefficient.
-
toString
-