Package com.io7m.jcamera
Class JCameraFPSStyleSnapshot
java.lang.Object
com.io7m.jcamera.JCameraFPSStyleSnapshot
- All Implemented Interfaces:
JCameraFPSStyleReadableType,JCameraFPSStyleSnapshotType,JCameraReadableSnapshotType,JCameraReadableType
An immutable snapshot of a camera.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeJCameraFPSStyleSnapshot. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forJCameraFPSStyleSnapshot.doubledoublecom.io7m.jtensors.core.unparameterized.vectors.Vector3Dcom.io7m.jtensors.core.unparameterized.vectors.Vector3Dcom.io7m.jtensors.core.unparameterized.vectors.Vector3Dcom.io7m.jtensors.core.unparameterized.vectors.Vector3Dstatic JCameraFPSStyleSnapshotcopyOf(JCameraFPSStyleSnapshotType instance) Creates an immutable copy of aJCameraFPSStyleSnapshotTypevalue.booleanThis instance is equal to all instances ofJCameraFPSStyleSnapshotthat have equal attribute values.inthashCode()Computes a hash code from attributes:cameraGetAngleAroundHorizontal,cameraGetAngleAroundVertical,cameraGetRight,cameraGetUp,cameraGetForward,cameraGetPosition.static JCameraFPSStyleSnapshotof(double cameraGetAngleAroundHorizontal, double cameraGetAngleAroundVertical, com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetRight, com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetUp, com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetForward, com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetPosition) Construct a new immutableJCameraFPSStyleSnapshotinstance.toString()Prints the immutable valueJCameraFPSStyleSnapshotwith attribute values.final JCameraFPSStyleSnapshotwithCameraGetAngleAroundHorizontal(double value) Copy the current immutable object by setting a value for thecameraGetAngleAroundHorizontalattribute.final JCameraFPSStyleSnapshotwithCameraGetAngleAroundVertical(double value) Copy the current immutable object by setting a value for thecameraGetAngleAroundVerticalattribute.final JCameraFPSStyleSnapshotwithCameraGetForward(com.io7m.jtensors.core.unparameterized.vectors.Vector3D value) Copy the current immutable object by setting a value for thecameraGetForwardattribute.final JCameraFPSStyleSnapshotwithCameraGetPosition(com.io7m.jtensors.core.unparameterized.vectors.Vector3D value) Copy the current immutable object by setting a value for thecameraGetPositionattribute.final JCameraFPSStyleSnapshotwithCameraGetRight(com.io7m.jtensors.core.unparameterized.vectors.Vector3D value) Copy the current immutable object by setting a value for thecameraGetRightattribute.final JCameraFPSStyleSnapshotwithCameraGetUp(com.io7m.jtensors.core.unparameterized.vectors.Vector3D value) Copy the current immutable object by setting a value for thecameraGetUpattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.io7m.jcamera.JCameraFPSStyleSnapshotType
cameraMakeViewMatrix, cameraMakeViewPMatrix
-
Method Details
-
cameraGetAngleAroundHorizontal
public double cameraGetAngleAroundHorizontal()- Specified by:
cameraGetAngleAroundHorizontalin interfaceJCameraFPSStyleReadableType- Specified by:
cameraGetAngleAroundHorizontalin interfaceJCameraFPSStyleSnapshotType- Returns:
- The value of the
cameraGetAngleAroundHorizontalattribute
-
cameraGetAngleAroundVertical
public double cameraGetAngleAroundVertical()- Specified by:
cameraGetAngleAroundVerticalin interfaceJCameraFPSStyleReadableType- Specified by:
cameraGetAngleAroundVerticalin interfaceJCameraFPSStyleSnapshotType- Returns:
- The value of the
cameraGetAngleAroundVerticalattribute
-
cameraGetRight
public com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetRight()- Specified by:
cameraGetRightin interfaceJCameraFPSStyleReadableType- Specified by:
cameraGetRightin interfaceJCameraFPSStyleSnapshotType- Returns:
- The value of the
cameraGetRightattribute
-
cameraGetUp
public com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetUp()- Specified by:
cameraGetUpin interfaceJCameraFPSStyleReadableType- Specified by:
cameraGetUpin interfaceJCameraFPSStyleSnapshotType- Returns:
- The value of the
cameraGetUpattribute
-
cameraGetForward
public com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetForward()- Specified by:
cameraGetForwardin interfaceJCameraFPSStyleReadableType- Specified by:
cameraGetForwardin interfaceJCameraFPSStyleSnapshotType- Returns:
- The value of the
cameraGetForwardattribute
-
cameraGetPosition
public com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetPosition()- Specified by:
cameraGetPositionin interfaceJCameraFPSStyleReadableType- Specified by:
cameraGetPositionin interfaceJCameraFPSStyleSnapshotType- Returns:
- The value of the
cameraGetPositionattribute
-
withCameraGetAngleAroundHorizontal
Copy the current immutable object by setting a value for thecameraGetAngleAroundHorizontalattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for cameraGetAngleAroundHorizontal- Returns:
- A modified copy of the
thisobject
-
withCameraGetAngleAroundVertical
Copy the current immutable object by setting a value for thecameraGetAngleAroundVerticalattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for cameraGetAngleAroundVertical- Returns:
- A modified copy of the
thisobject
-
withCameraGetRight
public final JCameraFPSStyleSnapshot withCameraGetRight(com.io7m.jtensors.core.unparameterized.vectors.Vector3D value) Copy the current immutable object by setting a value for thecameraGetRightattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for cameraGetRight- Returns:
- A modified copy of the
thisobject
-
withCameraGetUp
public final JCameraFPSStyleSnapshot withCameraGetUp(com.io7m.jtensors.core.unparameterized.vectors.Vector3D value) Copy the current immutable object by setting a value for thecameraGetUpattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for cameraGetUp- Returns:
- A modified copy of the
thisobject
-
withCameraGetForward
public final JCameraFPSStyleSnapshot withCameraGetForward(com.io7m.jtensors.core.unparameterized.vectors.Vector3D value) Copy the current immutable object by setting a value for thecameraGetForwardattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for cameraGetForward- Returns:
- A modified copy of the
thisobject
-
withCameraGetPosition
public final JCameraFPSStyleSnapshot withCameraGetPosition(com.io7m.jtensors.core.unparameterized.vectors.Vector3D value) Copy the current immutable object by setting a value for thecameraGetPositionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for cameraGetPosition- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofJCameraFPSStyleSnapshotthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:cameraGetAngleAroundHorizontal,cameraGetAngleAroundVertical,cameraGetRight,cameraGetUp,cameraGetForward,cameraGetPosition. -
toString
Prints the immutable valueJCameraFPSStyleSnapshotwith attribute values. -
of
public static JCameraFPSStyleSnapshot of(double cameraGetAngleAroundHorizontal, double cameraGetAngleAroundVertical, com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetRight, com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetUp, com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetForward, com.io7m.jtensors.core.unparameterized.vectors.Vector3D cameraGetPosition) Construct a new immutableJCameraFPSStyleSnapshotinstance.- Parameters:
cameraGetAngleAroundHorizontal- The value for thecameraGetAngleAroundHorizontalattributecameraGetAngleAroundVertical- The value for thecameraGetAngleAroundVerticalattributecameraGetRight- The value for thecameraGetRightattributecameraGetUp- The value for thecameraGetUpattributecameraGetForward- The value for thecameraGetForwardattributecameraGetPosition- The value for thecameraGetPositionattribute- Returns:
- An immutable JCameraFPSStyleSnapshot instance
-
copyOf
Creates an immutable copy of aJCameraFPSStyleSnapshotTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable JCameraFPSStyleSnapshot instance
-
builder
Creates a builder forJCameraFPSStyleSnapshot.JCameraFPSStyleSnapshot.builder() .setCameraGetAngleAroundHorizontal(double) // requiredcameraGetAngleAroundHorizontal.setCameraGetAngleAroundVertical(double) // requiredcameraGetAngleAroundVertical.setCameraGetRight(com.io7m.jtensors.core.unparameterized.vectors.Vector3D) // requiredcameraGetRight.setCameraGetUp(com.io7m.jtensors.core.unparameterized.vectors.Vector3D) // requiredcameraGetUp.setCameraGetForward(com.io7m.jtensors.core.unparameterized.vectors.Vector3D) // requiredcameraGetForward.setCameraGetPosition(com.io7m.jtensors.core.unparameterized.vectors.Vector3D) // requiredcameraGetPosition.build();- Returns:
- A new JCameraFPSStyleSnapshot builder
-