Package com.mojang.blaze3d.vertex
Record Class VertexFormatElement
java.lang.Object
java.lang.Record
com.mojang.blaze3d.vertex.VertexFormatElement
public record VertexFormatElement(int id, int index, VertexFormatElement.Type type, VertexFormatElement.Usage usage, int count)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final 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 intstatic final VertexFormatElementstatic final VertexFormatElementprivate final VertexFormatElement.TypeThe field for thetyperecord component.private final VertexFormatElement.UsageThe field for theusagerecord component.static final VertexFormatElementstatic final VertexFormatElementstatic final VertexFormatElementstatic final VertexFormatElement -
Constructor Summary
ConstructorsConstructorDescriptionVertexFormatElement(int id, int index, VertexFormatElement.Type type, VertexFormatElement.Usage usage, int count) Creates an instance of aVertexFormatElementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic VertexFormatElementbyId(int pId) intbyteSize()intcount()Returns the value of thecountrecord component.static Stream<VertexFormatElement> elementsFromMask(int pMask) 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()static VertexFormatElementregister(int pId, int pIndex, VertexFormatElement.Type pType, VertexFormatElement.Usage pUsage, int pCount) private booleansupportsUsage(int pIndex, VertexFormatElement.Usage pUsage) toString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.usage()Returns the value of theusagerecord 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. -
usage
The field for theusagerecord 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
-
-
Constructor Details
-
VertexFormatElement
public VertexFormatElement(int id, int index, VertexFormatElement.Type type, VertexFormatElement.Usage usage, int count) Creates an instance of aVertexFormatElementrecord class.- Parameters:
id- the value for theidrecord componentindex- the value for theindexrecord componenttype- the value for thetyperecord componentusage- the value for theusagerecord componentcount- the value for thecountrecord component
-
-
Method Details
-
register
public static VertexFormatElement register(int pId, int pIndex, VertexFormatElement.Type pType, VertexFormatElement.Usage pUsage, int pCount) -
supportsUsage
-
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. -
mask
public int mask() -
byteSize
public int byteSize() -
byId
-
elementsFromMask
-
findNextId
public static int findNextId() -
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 '=='. -
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
-
usage
Returns the value of theusagerecord component.- Returns:
- the value of the
usagerecord component
-
count
public int count()Returns the value of thecountrecord component.- Returns:
- the value of the
countrecord component
-