Record Class StencilTest
java.lang.Object
java.lang.Record
net.neoforged.neoforge.client.stencil.StencilTest
- Record Components:
front- The stencil test settings for front-faces (based on vertex winding).back- The stencil test settings for back-faces (based on vertex winding).readMask- the bitmask to apply to the current stencil buffer value before it is used in the stencil test.writeMask- the bitmask to apply to the stencil buffer value before writing it back to the stencil buffer after the test.referenceValue- The reference value that will be used in comparisons and written to the stencil buffer (depending on settings). Shaders can overwrite this per-fragment.
public record StencilTest(StencilPerFaceTest front, StencilPerFaceTest back, int readMask, int writeMask, int referenceValue)
extends Record
Describes the stencil test state for the render pipeline.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StencilPerFaceTestThe field for thebackrecord component.static intstatic intstatic intprivate final StencilPerFaceTestThe field for thefrontrecord component.private final intThe field for thereadMaskrecord component.private final intThe field for thereferenceValuerecord component.private final intThe field for thewriteMaskrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionStencilTest(StencilPerFaceTest test, int readMask, int writeMask, int referenceValue) StencilTest(StencilPerFaceTest front, StencilPerFaceTest back, int readMask, int writeMask, int referenceValue) Creates an instance of aStencilTestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionback()Returns the value of thebackrecord component.final booleanIndicates whether some other object is "equal to" this one.front()Returns the value of thefrontrecord component.final inthashCode()Returns a hash code value for this object.intreadMask()Returns the value of thereadMaskrecord component.intReturns the value of thereferenceValuerecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thewriteMaskrecord component.
-
Field Details
-
front
The field for thefrontrecord component. -
back
The field for thebackrecord component. -
readMask
private final int readMaskThe field for thereadMaskrecord component. -
writeMask
private final int writeMaskThe field for thewriteMaskrecord component. -
referenceValue
private final int referenceValueThe field for thereferenceValuerecord component. -
DEFAULT_READ_MASK
public static int DEFAULT_READ_MASK -
DEFAULT_WRITE_MASK
public static int DEFAULT_WRITE_MASK -
DEFAULT_REFERENCE_VALUE
public static int DEFAULT_REFERENCE_VALUE
-
-
Constructor Details
-
StencilTest
-
StencilTest
public StencilTest(StencilPerFaceTest front, StencilPerFaceTest back, int readMask, int writeMask, int referenceValue) Creates an instance of aStencilTestrecord class.- Parameters:
front- the value for thefrontrecord componentback- the value for thebackrecord componentreadMask- the value for thereadMaskrecord componentwriteMask- the value for thewriteMaskrecord componentreferenceValue- the value for thereferenceValuerecord component
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
front
Returns the value of thefrontrecord component.- Returns:
- the value of the
frontrecord component
-
back
Returns the value of thebackrecord component.- Returns:
- the value of the
backrecord component
-
readMask
public int readMask()Returns the value of thereadMaskrecord component.- Returns:
- the value of the
readMaskrecord component
-
writeMask
public int writeMask()Returns the value of thewriteMaskrecord component.- Returns:
- the value of the
writeMaskrecord component
-
referenceValue
public int referenceValue()Returns the value of thereferenceValuerecord component.- Returns:
- the value of the
referenceValuerecord component
-