Record Class VertexAttribute
java.lang.Object
java.lang.Record
dev.engine.core.mesh.VertexAttribute
public record VertexAttribute(int location, int componentCount, ComponentType componentType, boolean normalized, int offset, int divisor)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionVertexAttribute(int location, int componentCount, ComponentType componentType, boolean normalized, int offset) VertexAttribute(int location, int componentCount, ComponentType componentType, boolean normalized, int offset, int divisor) Creates an instance of aVertexAttributerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecomponentCountrecord component.Returns the value of thecomponentTyperecord component.intdivisor()Returns the value of thedivisorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanintlocation()Returns the value of thelocationrecord component.booleanReturns the value of thenormalizedrecord component.intoffset()Returns the value of theoffsetrecord component.intfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
VertexAttribute
public VertexAttribute(int location, int componentCount, ComponentType componentType, boolean normalized, int offset) -
VertexAttribute
public VertexAttribute(int location, int componentCount, ComponentType componentType, boolean normalized, int offset, int divisor) Creates an instance of aVertexAttributerecord class.- Parameters:
location- the value for thelocationrecord componentcomponentCount- the value for thecomponentCountrecord componentcomponentType- the value for thecomponentTyperecord componentnormalized- the value for thenormalizedrecord componentoffset- the value for theoffsetrecord componentdivisor- the value for thedivisorrecord component
-
-
Method Details
-
sizeInBytes
public int sizeInBytes() -
isPerInstance
public boolean isPerInstance() -
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. -
location
public int location()Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-
componentCount
public int componentCount()Returns the value of thecomponentCountrecord component.- Returns:
- the value of the
componentCountrecord component
-
componentType
Returns the value of thecomponentTyperecord component.- Returns:
- the value of the
componentTyperecord component
-
normalized
public boolean normalized()Returns the value of thenormalizedrecord component.- Returns:
- the value of the
normalizedrecord component
-
offset
public int offset()Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-
divisor
public int divisor()Returns the value of thedivisorrecord component.- Returns:
- the value of the
divisorrecord component
-