@EqualityStructural public final class JCameraFPSStyle extends Object implements JCameraFPSStyleType
JCameraFPSStyleType.| Modifier and Type | Method and Description |
|---|---|
void |
cameraClampHorizontalDisable()
Do not clamp rotations around the horizontal axis.
|
void |
cameraClampHorizontalEnable(double min,
double max)
Clamp the possible rotations around the horizontal axis to the given
bounds.
|
double |
cameraGetAngleAroundHorizontal() |
double |
cameraGetAngleAroundVertical() |
com.io7m.jtensors.core.unparameterized.vectors.Vector3D |
cameraGetForward() |
com.io7m.jtensors.core.unparameterized.vectors.Vector3D |
cameraGetPosition() |
com.io7m.jtensors.core.unparameterized.vectors.Vector3D |
cameraGetRight() |
com.io7m.jtensors.core.unparameterized.vectors.Vector3D |
cameraGetUp() |
com.io7m.jtensors.core.unparameterized.matrices.Matrix4x4D |
cameraMakeViewMatrix()
Construct a view matrix for the camera.
|
<T0,T1> com.io7m.jtensors.core.parameterized.matrices.PMatrix4x4D<T0,T1> |
cameraMakeViewPMatrix()
Construct a view matrix for the camera.
|
void |
cameraMoveForward(double u)
Move the camera forward
u units iff u
is positive, or backward u units iff u is
negative. |
void |
cameraMoveRight(double u)
Move the camera right
u units iff u is
positive, or left u units iff u is
negative. |
void |
cameraMoveUp(double u)
Move the camera up
u units iff u is
positive, or down u units iff u is
negative. |
boolean |
cameraRotateAroundHorizontal(double r)
Rotate by
r radians around the local X axis. |
void |
cameraRotateAroundVertical(double r)
Rotate by
r radians around the global Y axis. |
void |
cameraSetAngleAroundHorizontal(double h)
Set the angle around the horizontal axis to
h. |
void |
cameraSetAngleAroundVertical(double v)
Set the angle around the vertical axis to
v. |
void |
cameraSetPosition(com.io7m.jtensors.core.unparameterized.vectors.Vector3D v)
Set the position of the camera.
|
void |
cameraSetPosition3(double x,
double y,
double z)
Set the position of the camera.
|
boolean |
equals(Object o) |
int |
hashCode() |
static JCameraFPSStyleType |
newCamera() |
static JCameraFPSStyleType |
newCameraFrom(JCameraFPSStyleReadableType c) |
String |
toString() |
public static JCameraFPSStyleType newCamera()
public static JCameraFPSStyleType newCameraFrom(JCameraFPSStyleReadableType c)
c - An existing camerapublic void cameraClampHorizontalDisable()
JCameraFPSStyleTypecameraClampHorizontalDisable in interface JCameraFPSStyleTypeJCameraFPSStyleType.cameraClampHorizontalEnable(double, double)public void cameraClampHorizontalEnable(double min,
double max)
JCameraFPSStyleTypecameraClampHorizontalEnable in interface JCameraFPSStyleTypemin - The minimum anglemax - The maximum anglepublic double cameraGetAngleAroundHorizontal()
cameraGetAngleAroundHorizontal in interface JCameraFPSStyleReadableTypepublic double cameraGetAngleAroundVertical()
cameraGetAngleAroundVertical in interface JCameraFPSStyleReadableTypepublic com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetForward()
cameraGetForward in interface JCameraFPSStyleReadableTypepublic com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetPosition()
cameraGetPosition in interface JCameraFPSStyleReadableTypepublic com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetRight()
cameraGetRight in interface JCameraFPSStyleReadableTypepublic com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetUp()
cameraGetUp in interface JCameraFPSStyleReadableTypepublic com.io7m.jtensors.core.unparameterized.matrices.Matrix4x4D cameraMakeViewMatrix()
JCameraReadableTypecameraMakeViewMatrix in interface JCameraReadableTypepublic <T0,T1> com.io7m.jtensors.core.parameterized.matrices.PMatrix4x4D<T0,T1> cameraMakeViewPMatrix()
JCameraReadableTypecameraMakeViewPMatrix in interface JCameraReadableTypeT0 - The source coordinate systemT1 - The target coordiante systempublic void cameraMoveForward(double u)
JCameraFPSStyleTypeMove the camera forward u units iff u
is positive, or backward u units iff u is
negative.
The forward direction, in this case, means the current view direction.
cameraMoveForward in interface JCameraFPSStyleTypeu - The units to movepublic void cameraMoveRight(double u)
JCameraFPSStyleTypeMove the camera right u units iff u is
positive, or left u units iff u is
negative.
The right direction, in this case, means the
direction perpendicular to the current view direction, -π / 2
radians around the global Y axis.
cameraMoveRight in interface JCameraFPSStyleTypeu - The units to movepublic void cameraMoveUp(double u)
JCameraFPSStyleType Move the camera up u units iff u is
positive, or down u units iff u is
negative.
The up direction, in this case, means the direction towards positive infinity on the global Y axis.
cameraMoveUp in interface JCameraFPSStyleTypeu - The units to movepublic boolean cameraRotateAroundHorizontal(double r)
JCameraFPSStyleTypeRotate by r radians 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.
cameraRotateAroundHorizontal in interface JCameraFPSStyleTyper - The radians to rotatetrue if the rotation has been clampedJCameraFPSStyleType.cameraClampHorizontalEnable(double, double)public void cameraRotateAroundVertical(double r)
JCameraFPSStyleType Rotate by r radians 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.
cameraRotateAroundVertical in interface JCameraFPSStyleTyper - The radians to rotatepublic void cameraSetAngleAroundHorizontal(double h)
JCameraFPSStyleTypeh.cameraSetAngleAroundHorizontal in interface JCameraFPSStyleTypeh - The angle.public void cameraSetAngleAroundVertical(double v)
JCameraFPSStyleTypev.cameraSetAngleAroundVertical in interface JCameraFPSStyleTypev - The angle.public void cameraSetPosition(com.io7m.jtensors.core.unparameterized.vectors.Vector3D v)
cameraSetPosition in interface JCameraFPSStyleTypev - The position.public void cameraSetPosition3(double x,
double y,
double z)
cameraSetPosition3 in interface JCameraFPSStyleTypex - The x coordinate.y - The y coordinate.z - The z coordinate.Copyright © 2017 <code@io7m.com> http://io7m.com