Class JCameraFPSStyle
- All Implemented Interfaces:
JCameraFPSStyleReadableType,JCameraFPSStyleType,JCameraReadableType,JCameraType
JCameraFPSStyleType.-
Method Summary
Modifier and TypeMethodDescriptionvoidDo not clamp rotations around the horizontal axis.voidcameraClampHorizontalEnable(double min, double max) Clamp the possible rotations around the horizontal axis to the given bounds.doubledoublecom.io7m.jtensors.core.unparameterized.vectors.Vector3Dcom.io7m.jtensors.core.unparameterized.vectors.Vector3Dcom.io7m.jtensors.core.unparameterized.vectors.Vector3Dcom.io7m.jtensors.core.unparameterized.vectors.Vector3Dcom.io7m.jtensors.core.unparameterized.matrices.Matrix4x4DConstruct a view matrix for the camera.<T0,T1> com.io7m.jtensors.core.parameterized.matrices.PMatrix4x4D<T0, T1> Construct a view matrix for the camera.voidcameraMoveForward(double u) Move the camera forwarduunits iffuis positive, or backwarduunits iffuis negative.voidcameraMoveRight(double u) Move the camera rightuunits iffuis positive, or leftuunits iffuis negative.voidcameraMoveUp(double u) Move the camera upuunits iffuis positive, or downuunits iffuis negative.booleancameraRotateAroundHorizontal(double r) Rotate byrradians around the local X axis.voidcameraRotateAroundVertical(double r) Rotate byrradians around the global Y axis.voidcameraSetAngleAroundHorizontal(double h) Set the angle around the horizontal axis toh.voidcameraSetAngleAroundVertical(double v) Set the angle around the vertical axis tov.voidcameraSetPosition(com.io7m.jtensors.core.unparameterized.vectors.Vector3D v) Set the position of the camera.voidcameraSetPosition3(double x, double y, double z) Set the position of the camera.booleaninthashCode()static JCameraFPSStyleTypestatic JCameraFPSStyleTypetoString()
-
Method Details
-
newCamera
- Returns:
- A new FPS camera
-
newCameraFrom
- Parameters:
c- An existing camera- Returns:
- A new FPS camera based on the given camera.
-
cameraClampHorizontalDisable
public void cameraClampHorizontalDisable()Description copied from interface:JCameraFPSStyleTypeDo not clamp rotations around the horizontal axis.- Specified by:
cameraClampHorizontalDisablein interfaceJCameraFPSStyleType- See Also:
-
cameraClampHorizontalEnable
public void cameraClampHorizontalEnable(double min, double max) Description copied from interface:JCameraFPSStyleTypeClamp the possible rotations around the horizontal axis to the given bounds.- Specified by:
cameraClampHorizontalEnablein interfaceJCameraFPSStyleType- Parameters:
min- The minimum anglemax- The maximum angle
-
cameraGetAngleAroundHorizontal
public double cameraGetAngleAroundHorizontal()- Specified by:
cameraGetAngleAroundHorizontalin interfaceJCameraFPSStyleReadableType- Returns:
- The angle around the horizontal axis.
-
cameraGetAngleAroundVertical
public double cameraGetAngleAroundVertical()- Specified by:
cameraGetAngleAroundVerticalin interfaceJCameraFPSStyleReadableType- Returns:
- The angle around the vertical axis.
-
cameraGetForward
public com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetForward()- Specified by:
cameraGetForwardin interfaceJCameraFPSStyleReadableType- Returns:
- The forward direction for the camera.
-
cameraGetPosition
public com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetPosition()- Specified by:
cameraGetPositionin interfaceJCameraFPSStyleReadableType- Returns:
- The position of the camera.
-
cameraGetRight
public com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetRight()- Specified by:
cameraGetRightin interfaceJCameraFPSStyleReadableType- Returns:
- The right direction for the camera.
-
cameraGetUp
public com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetUp()- Specified by:
cameraGetUpin interfaceJCameraFPSStyleReadableType- Returns:
- The up direction for the camera.
-
cameraMakeViewMatrix
public com.io7m.jtensors.core.unparameterized.matrices.Matrix4x4D cameraMakeViewMatrix()Description copied from interface:JCameraReadableTypeConstruct a view matrix for the camera.- Specified by:
cameraMakeViewMatrixin interfaceJCameraReadableType- Returns:
- A view matrix for the camera
-
cameraMakeViewPMatrix
public <T0,T1> com.io7m.jtensors.core.parameterized.matrices.PMatrix4x4D<T0,T1> cameraMakeViewPMatrix()Description copied from interface:JCameraReadableTypeConstruct a view matrix for the camera.- Specified by:
cameraMakeViewPMatrixin interfaceJCameraReadableType- Type Parameters:
T0- The source coordinate systemT1- The target coordiante system- Returns:
- A view matrix for the camera
-
cameraMoveForward
public void cameraMoveForward(double u) Description copied from interface:JCameraFPSStyleTypeMove the camera forward
uunits iffuis positive, or backwarduunits iffuis negative.The forward direction, in this case, means the current view direction.
- Specified by:
cameraMoveForwardin interfaceJCameraFPSStyleType- Parameters:
u- The units to move
-
cameraMoveRight
public void cameraMoveRight(double u) Description copied from interface:JCameraFPSStyleTypeMove the camera right
uunits iffuis positive, or leftuunits iffuis negative.The right direction, in this case, means the direction perpendicular to the current view direction,
-π / 2radians around the global Y axis.- Specified by:
cameraMoveRightin interfaceJCameraFPSStyleType- Parameters:
u- The units to move
-
cameraMoveUp
public void cameraMoveUp(double u) Description copied from interface:JCameraFPSStyleTypeMove the camera up
uunits iffuis positive, or downuunits iffuis negative.The up direction, in this case, means the direction towards positive infinity on the global Y axis.
- Specified by:
cameraMoveUpin interfaceJCameraFPSStyleType- Parameters:
u- The units to move
-
cameraRotateAroundHorizontal
public boolean cameraRotateAroundHorizontal(double r) Description copied from interface:JCameraFPSStyleTypeRotate by
rradians around the local X axis.Note that by convention, when looking towards negative infinity on an axis, a positive rotation value results in a counter-clockwise rotation on the axis.
A human analogy would be that a positive value passed to this function causes the camera to look up towards the sky. A negative value causes the camera to look down towards the ground.
- Specified by:
cameraRotateAroundHorizontalin interfaceJCameraFPSStyleType- Parameters:
r- The radians to rotate- Returns:
trueif the rotation has been clamped- See Also:
-
cameraRotateAroundVertical
public void cameraRotateAroundVertical(double r) Description copied from interface:JCameraFPSStyleTypeRotate by
rradians around the global Y axis.Note that by convention, when looking towards negative infinity on an axis, a positive rotation value results in a counter-clockwise rotation on the axis.
A human analogy would be that a positive value passed to this function causes the camera to turn left, while a negative value causes the camera to look right.
- Specified by:
cameraRotateAroundVerticalin interfaceJCameraFPSStyleType- Parameters:
r- The radians to rotate
-
cameraSetAngleAroundHorizontal
public void cameraSetAngleAroundHorizontal(double h) Description copied from interface:JCameraFPSStyleTypeSet the angle around the horizontal axis toh.- Specified by:
cameraSetAngleAroundHorizontalin interfaceJCameraFPSStyleType- Parameters:
h- The angle.
-
cameraSetAngleAroundVertical
public void cameraSetAngleAroundVertical(double v) Description copied from interface:JCameraFPSStyleTypeSet the angle around the vertical axis tov.- Specified by:
cameraSetAngleAroundVerticalin interfaceJCameraFPSStyleType- Parameters:
v- The angle.
-
cameraSetPosition
public void cameraSetPosition(com.io7m.jtensors.core.unparameterized.vectors.Vector3D v) Set the position of the camera.- Specified by:
cameraSetPositionin interfaceJCameraFPSStyleType- Parameters:
v- The position.
-
cameraSetPosition3
public void cameraSetPosition3(double x, double y, double z) Set the position of the camera.- Specified by:
cameraSetPosition3in interfaceJCameraFPSStyleType- Parameters:
x- The x coordinate.y- The y coordinate.z- The z coordinate.
-
equals
-
hashCode
public int hashCode() -
toString
-