@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(float min,
float max)
Clamp the possible rotations around the horizontal axis to the given
bounds.
|
float |
cameraGetAngleAroundHorizontal() |
float |
cameraGetAngleAroundVertical() |
com.io7m.jtensors.VectorReadable3FType |
cameraGetForward() |
com.io7m.jtensors.VectorReadable3FType |
cameraGetPosition() |
com.io7m.jtensors.VectorReadable3FType |
cameraGetRight() |
com.io7m.jtensors.VectorReadable3FType |
cameraGetUp() |
JCameraFPSStyleSnapshot |
cameraMakeSnapshot() |
void |
cameraMakeViewMatrix(JCameraContext ctx,
com.io7m.jtensors.Matrix4x4FType m)
Construct a view matrix for the camera, using preallocated storage in
ctx and writing the result to m. |
<T0,T1> void |
cameraMakeViewPMatrix(JCameraContext ctx,
com.io7m.jtensors.parameterized.PMatrix4x4FType<T0,T1> m)
Construct a view matrix for the camera, using preallocated storage in
ctx and writing the result to m. |
void |
cameraMoveForward(float u)
Move the camera forward
u units iff u
is positive, or backward u units iff u is
negative. |
void |
cameraMoveRight(float u)
Move the camera right
u units iff u is
positive, or left u units iff u is
negative. |
void |
cameraMoveUp(float u)
Move the camera up
u units iff u is
positive, or down u units iff u is
negative. |
boolean |
cameraRotateAroundHorizontal(float r)
Rotate by
r radians around the local X axis. |
void |
cameraRotateAroundVertical(float r)
Rotate by
r radians around the global Y axis. |
void |
cameraSetAngleAroundHorizontal(float h)
Set the angle around the horizontal axis to
h. |
void |
cameraSetAngleAroundVertical(float v)
Set the angle around the vertical axis to
v. |
void |
cameraSetPosition(com.io7m.jtensors.VectorReadable3FType v)
Set the position of the camera.
|
void |
cameraSetPosition3f(float x,
float y,
float z)
Set the position of the camera.
|
boolean |
equals(Object obj) |
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(float, float)public void cameraClampHorizontalEnable(float min,
float max)
JCameraFPSStyleTypecameraClampHorizontalEnable in interface JCameraFPSStyleTypemin - The minimum anglemax - The maximum anglepublic float cameraGetAngleAroundHorizontal()
cameraGetAngleAroundHorizontal in interface JCameraFPSStyleReadableTypepublic float cameraGetAngleAroundVertical()
cameraGetAngleAroundVertical in interface JCameraFPSStyleReadableTypepublic com.io7m.jtensors.VectorReadable3FType cameraGetForward()
cameraGetForward in interface JCameraFPSStyleReadableTypepublic com.io7m.jtensors.VectorReadable3FType cameraGetPosition()
cameraGetPosition in interface JCameraFPSStyleReadableTypepublic com.io7m.jtensors.VectorReadable3FType cameraGetRight()
cameraGetRight in interface JCameraFPSStyleReadableTypepublic com.io7m.jtensors.VectorReadable3FType cameraGetUp()
cameraGetUp in interface JCameraFPSStyleReadableTypepublic JCameraFPSStyleSnapshot cameraMakeSnapshot()
cameraMakeSnapshot in interface JCameraFPSStyleReadableTypepublic void cameraMakeViewMatrix(JCameraContext ctx, com.io7m.jtensors.Matrix4x4FType m)
JCameraReadableTypectx and writing the result to m.cameraMakeViewMatrix in interface JCameraReadableTypectx - Preallocated storagem - The output matrixpublic <T0,T1> void cameraMakeViewPMatrix(JCameraContext ctx, com.io7m.jtensors.parameterized.PMatrix4x4FType<T0,T1> m)
JCameraReadableTypectx and writing the result to m.cameraMakeViewPMatrix in interface JCameraReadableTypeT0 - The source coordinate systemT1 - The target coordiante systemctx - Preallocated storagem - The output matrixpublic void cameraMoveForward(float u)
JCameraFPSStyleType Move 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(float u)
JCameraFPSStyleType Move 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(float 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(float r)
JCameraFPSStyleType Rotate 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(float, float)public void cameraRotateAroundVertical(float 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(float h)
JCameraFPSStyleTypeh.cameraSetAngleAroundHorizontal in interface JCameraFPSStyleTypeh - The angle.public void cameraSetAngleAroundVertical(float v)
JCameraFPSStyleTypev.cameraSetAngleAroundVertical in interface JCameraFPSStyleTypev - The angle.public void cameraSetPosition(com.io7m.jtensors.VectorReadable3FType v)
cameraSetPosition in interface JCameraFPSStyleTypev - The position.public void cameraSetPosition3f(float x,
float y,
float z)
cameraSetPosition3f in interface JCameraFPSStyleTypex - The x coordinate.y - The y coordinate.z - The z coordinate.Copyright © 2016 <code@io7m.com> http://io7m.com