Record Class VertexFormatElement
java.lang.Object
java.lang.Record
com.mojang.blaze3d.vertex.VertexFormatElement
public record VertexFormatElement(int id, int index, VertexFormatElement.Type type, boolean normalized, int count)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final @Nullable VertexFormatElement[]static final VertexFormatElementprivate final intThe field for thecountrecord component.private static final List<VertexFormatElement> private final intThe field for theidrecord component.private final intThe field for theindexrecord component.static final VertexFormatElementstatic final intstatic final VertexFormatElementprivate final booleanThe field for thenormalizedrecord component.static final VertexFormatElementprivate final VertexFormatElement.TypeThe field for thetyperecord component.static final VertexFormatElementstatic final VertexFormatElementstatic final VertexFormatElementstatic final VertexFormatElement -
Constructor Summary
ConstructorsConstructorDescriptionVertexFormatElement(int id, int index, VertexFormatElement.Type type, boolean normalized, int count) Creates an instance of aVertexFormatElementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable VertexFormatElementbyId(int id) intbyteSize()intcount()Returns the value of thecountrecord component.static Stream<VertexFormatElement> elementsFromMask(int mask) final booleanIndicates whether some other object is "equal to" this one.static intfinal inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.intindex()Returns the value of theindexrecord component.intmask()booleanReturns the value of thenormalizedrecord component.static VertexFormatElementregister(int id, int index, VertexFormatElement.Type type, boolean normalized, int count) toString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Field Details
-
id
private final int idThe field for theidrecord component. -
index
private final int indexThe field for theindexrecord component. -
type
The field for thetyperecord component. -
normalized
private final boolean normalizedThe field for thenormalizedrecord component. -
count
private final int countThe field for thecountrecord component. -
MAX_COUNT
public static final int MAX_COUNT- See Also:
-
BY_ID
-
ELEMENTS
-
POSITION
-
COLOR
-
UV0
-
UV
-
UV1
-
UV2
-
NORMAL
-
LINE_WIDTH
-
-
Constructor Details
-
VertexFormatElement
public VertexFormatElement(int id, int index, VertexFormatElement.Type type, boolean normalized, int count) Creates an instance of aVertexFormatElementrecord class.- Parameters:
id- the value for theidrecord componentindex- the value for theindexrecord componenttype- the value for thetyperecord componentnormalized- the value for thenormalizedrecord componentcount- the value for thecountrecord component
-
-
Method Details
-
register
public static VertexFormatElement register(int id, int index, VertexFormatElement.Type type, boolean normalized, int count) -
toString
-
mask
public int mask() -
byteSize
public int byteSize() -
byId
-
elementsFromMask
-
findNextId
public static int findNextId() -
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. -
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
normalized
public boolean normalized()Returns the value of thenormalizedrecord component.- Returns:
- the value of the
normalizedrecord component
-
count
public int count()Returns the value of thecountrecord component.- Returns:
- the value of the
countrecord component
-