Class VulkanVertexInputBindingDescription

java.lang.Object
com.io7m.jcoronado.api.VulkanVertexInputBindingDescription
All Implemented Interfaces:
VulkanVertexInputBindingDescriptionType

public final class VulkanVertexInputBindingDescription extends Object implements VulkanVertexInputBindingDescriptionType
Structure specifying vertex input binding description.
See Also:
  • "VkVertexInputBindingDescription"
  • Method Details

    • binding

      public int binding()
      Specified by:
      binding in interface VulkanVertexInputBindingDescriptionType
      Returns:
      The binding number that this structure describes.
    • stride

      public int stride()
      Specified by:
      stride in interface VulkanVertexInputBindingDescriptionType
      Returns:
      The distance in bytes between two consecutive elements within the buffer.
    • inputRate

      public VulkanVertexInputRate inputRate()
      Specified by:
      inputRate in interface VulkanVertexInputBindingDescriptionType
      Returns:
      Specifies whether vertex attribute addressing is a function of the vertex index or of the instance index.
    • withBinding

      public final VulkanVertexInputBindingDescription withBinding(int value)
      Copy the current immutable object by setting a value for the binding attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for binding
      Returns:
      A modified copy of the this object
    • withStride

      public final VulkanVertexInputBindingDescription withStride(int value)
      Copy the current immutable object by setting a value for the stride attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for stride
      Returns:
      A modified copy of the this object
    • withInputRate

      public final VulkanVertexInputBindingDescription withInputRate(VulkanVertexInputRate value)
      Copy the current immutable object by setting a value for the inputRate attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for inputRate
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of VulkanVertexInputBindingDescription that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: binding, stride, inputRate.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value VulkanVertexInputBindingDescription with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • of

      public static VulkanVertexInputBindingDescription of(int binding, int stride, VulkanVertexInputRate inputRate)
      Construct a new immutable VulkanVertexInputBindingDescription instance.
      Parameters:
      binding - The value for the binding attribute
      stride - The value for the stride attribute
      inputRate - The value for the inputRate attribute
      Returns:
      An immutable VulkanVertexInputBindingDescription instance
    • copyOf

      Creates an immutable copy of a VulkanVertexInputBindingDescriptionType 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 VulkanVertexInputBindingDescription instance
    • builder

      Creates a builder for VulkanVertexInputBindingDescription.
       VulkanVertexInputBindingDescription.builder()
          .setBinding(int) // required binding
          .setStride(int) // required stride
          .setInputRate(com.io7m.jcoronado.api.VulkanVertexInputRate) // required inputRate
          .build();
       
      Returns:
      A new VulkanVertexInputBindingDescription builder