Module com.io7m.jcoronado.api
Package com.io7m.jcoronado.api
Class VulkanVertexInputAttributeDescription
- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanVertexInputAttributeDescription
-
- All Implemented Interfaces:
VulkanVertexInputAttributeDescriptionType
public final class VulkanVertexInputAttributeDescription extends java.lang.Object implements VulkanVertexInputAttributeDescriptionType
Structure specifying vertex input attribute description.- See Also:
- "VkVertexInputAttributeDescription"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanVertexInputAttributeDescription.Builder
Builds instances of typeVulkanVertexInputAttributeDescription
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
binding()
static VulkanVertexInputAttributeDescription.Builder
builder()
Creates a builder forVulkanVertexInputAttributeDescription
.static VulkanVertexInputAttributeDescription
copyOf(VulkanVertexInputAttributeDescriptionType instance)
Creates an immutable copy of aVulkanVertexInputAttributeDescriptionType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanVertexInputAttributeDescription
that have equal attribute values.VulkanFormat
format()
int
hashCode()
Computes a hash code from attributes:location
,binding
,format
,offset
.int
location()
static VulkanVertexInputAttributeDescription
of(int location, int binding, VulkanFormat format, int offset)
Construct a new immutableVulkanVertexInputAttributeDescription
instance.int
offset()
java.lang.String
toString()
Prints the immutable valueVulkanVertexInputAttributeDescription
with attribute values.VulkanVertexInputAttributeDescription
withBinding(int value)
Copy the current immutable object by setting a value for thebinding
attribute.VulkanVertexInputAttributeDescription
withFormat(VulkanFormat value)
Copy the current immutable object by setting a value for theformat
attribute.VulkanVertexInputAttributeDescription
withLocation(int value)
Copy the current immutable object by setting a value for thelocation
attribute.VulkanVertexInputAttributeDescription
withOffset(int value)
Copy the current immutable object by setting a value for theoffset
attribute.
-
-
-
Method Detail
-
location
public int location()
- Specified by:
location
in interfaceVulkanVertexInputAttributeDescriptionType
- Returns:
- The shader binding location number for this attribute.
-
binding
public int binding()
- Specified by:
binding
in interfaceVulkanVertexInputAttributeDescriptionType
- Returns:
- The binding number which this attribute takes its data from.
-
format
public VulkanFormat format()
- Specified by:
format
in interfaceVulkanVertexInputAttributeDescriptionType
- Returns:
- The the size and type of the vertex attribute data.
-
offset
public int offset()
- Specified by:
offset
in interfaceVulkanVertexInputAttributeDescriptionType
- Returns:
- a byte offset of this attribute relative to the start of an element in the vertex input binding.
-
withLocation
public final VulkanVertexInputAttributeDescription withLocation(int value)
Copy the current immutable object by setting a value for thelocation
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for location- Returns:
- A modified copy of the
this
object
-
withBinding
public final VulkanVertexInputAttributeDescription withBinding(int value)
Copy the current immutable object by setting a value for thebinding
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for binding- Returns:
- A modified copy of the
this
object
-
withFormat
public final VulkanVertexInputAttributeDescription withFormat(VulkanFormat value)
Copy the current immutable object by setting a value for theformat
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for format- Returns:
- A modified copy of the
this
object
-
withOffset
public final VulkanVertexInputAttributeDescription withOffset(int value)
Copy the current immutable object by setting a value for theoffset
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for offset- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanVertexInputAttributeDescription
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()
Computes a hash code from attributes:location
,binding
,format
,offset
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanVertexInputAttributeDescription
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanVertexInputAttributeDescription of(int location, int binding, VulkanFormat format, int offset)
Construct a new immutableVulkanVertexInputAttributeDescription
instance.- Parameters:
location
- The value for thelocation
attributebinding
- The value for thebinding
attributeformat
- The value for theformat
attributeoffset
- The value for theoffset
attribute- Returns:
- An immutable VulkanVertexInputAttributeDescription instance
-
copyOf
public static VulkanVertexInputAttributeDescription copyOf(VulkanVertexInputAttributeDescriptionType instance)
Creates an immutable copy of aVulkanVertexInputAttributeDescriptionType
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable VulkanVertexInputAttributeDescription instance
-
builder
public static VulkanVertexInputAttributeDescription.Builder builder()
Creates a builder forVulkanVertexInputAttributeDescription
.- Returns:
- A new VulkanVertexInputAttributeDescription builder
-
-