Record Class CameraParams
java.lang.Object
java.lang.Record
dev.engine.graphics.shader.params.CameraParams
public record CameraParams(Mat4 viewProjection, Mat4 view, Mat4 projection, Vec3 position, float near, float far)
extends Record
Camera parameters uploaded to the GPU each frame.
Used by
to generate
the Slang
invalid reference
dev.engine.core.shader.SlangParamsBlock
camera global (e.g., camera.get_viewProjection()).-
Constructor Summary
ConstructorsConstructorDescriptionCameraParams(Mat4 viewProjection, Mat4 view, Mat4 projection, Vec3 position, float near, float far) Creates an instance of aCameraParamsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.floatfar()Returns the value of thefarrecord component.final inthashCode()Returns a hash code value for this object.floatnear()Returns the value of thenearrecord component.position()Returns the value of thepositionrecord component.Returns the value of theprojectionrecord component.final StringtoString()Returns a string representation of this record class.view()Returns the value of theviewrecord component.Returns the value of theviewProjectionrecord component.
-
Constructor Details
-
CameraParams
public CameraParams(Mat4 viewProjection, Mat4 view, Mat4 projection, Vec3 position, float near, float far) Creates an instance of aCameraParamsrecord class.- Parameters:
viewProjection- the value for theviewProjectionrecord componentview- the value for theviewrecord componentprojection- the value for theprojectionrecord componentposition- the value for thepositionrecord componentnear- the value for thenearrecord componentfar- the value for thefarrecord component
-
-
Method Details
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
viewProjection
Returns the value of theviewProjectionrecord component.- Returns:
- the value of the
viewProjectionrecord component
-
view
Returns the value of theviewrecord component.- Returns:
- the value of the
viewrecord component
-
projection
Returns the value of theprojectionrecord component.- Returns:
- the value of the
projectionrecord component
-
position
Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
near
public float near()Returns the value of thenearrecord component.- Returns:
- the value of the
nearrecord component
-
far
public float far()Returns the value of thefarrecord component.- Returns:
- the value of the
farrecord component
-