Package ke.ric.renderer.api
Record Class SceneCamera
java.lang.Object
java.lang.Record
ke.ric.renderer.api.SceneCamera
- Record Components:
x- world X position in blocksy- world Y position in blocksz- world Z position in blocksyawRadians- finite native yaw in radians (negated Bukkit yaw)pitchRadians- finite pitch in radians (same sign as Bukkit pitch)rollRadians- finite local camera roll in radiansfovRadians- finite vertical field of view, strictly between 0 and pi
public record SceneCamera(double x, double y, double z, double yawRadians, double pitchRadians, double rollRadians, double fovRadians)
extends Record
Immutable camera pose in world blocks and radians. The native basis applies local roll, then
pitch, then yaw. At zero yaw/pitch the camera faces +Z and screen-left is +X; positive roll
rotates screen-left toward +Y. All rotations, including full rolls and inverted views, are valid.
Bukkit yaw is negated before conversion to radians; Bukkit pitch retains its sign.
Fluent snapshot/stream FOV and roll methods instead accept degrees.
-
Constructor Summary
ConstructorsConstructorDescriptionSceneCamera(double x, double y, double z, double yawRadians, double pitchRadians, double rollRadians, double fovRadians) Constructs a validated immutable value. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of thefovRadiansrecord component.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thepitchRadiansrecord component.doubleReturns the value of therollRadiansrecord component.final StringtoString()Returns a string representation of this record class.doublex()Returns the value of thexrecord component.doubley()Returns the value of theyrecord component.doubleReturns the value of theyawRadiansrecord component.doublez()Returns the value of thezrecord component.
-
Constructor Details
-
SceneCamera
public SceneCamera(double x, double y, double z, double yawRadians, double pitchRadians, double rollRadians, double fovRadians) Constructs a validated immutable value.- Throws:
IllegalArgumentException- if a coordinate or angle is nonfinite, or FOV is invalid
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
x
public double x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public double y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
z
public double z()Returns the value of thezrecord component.- Returns:
- the value of the
zrecord component
-
yawRadians
public double yawRadians()Returns the value of theyawRadiansrecord component.- Returns:
- the value of the
yawRadiansrecord component
-
pitchRadians
public double pitchRadians()Returns the value of thepitchRadiansrecord component.- Returns:
- the value of the
pitchRadiansrecord component
-
rollRadians
public double rollRadians()Returns the value of therollRadiansrecord component.- Returns:
- the value of the
rollRadiansrecord component
-
fovRadians
public double fovRadians()Returns the value of thefovRadiansrecord component.- Returns:
- the value of the
fovRadiansrecord component
-