Class VulkanImageSubresourceRange

java.lang.Object
com.io7m.jcoronado.api.VulkanImageSubresourceRange
All Implemented Interfaces:
VulkanImageSubresourceRangeType

public final class VulkanImageSubresourceRange extends Object implements VulkanImageSubresourceRangeType
Structure specifying a image subresource range.
See Also:
  • "VkImageSubresourceRange"
  • Method Details

    • aspectMask

      public Set<VulkanImageAspectFlag> aspectMask()
      Specified by:
      aspectMask in interface VulkanImageSubresourceRangeType
      Returns:
      The image aspect flags
    • baseMipLevel

      public int baseMipLevel()
      Specified by:
      baseMipLevel in interface VulkanImageSubresourceRangeType
      Returns:
      The first mipmap level accessible to the view.
    • levelCount

      public int levelCount()
      Specified by:
      levelCount in interface VulkanImageSubresourceRangeType
      Returns:
      The number of mipmap levels (starting from baseMipLevel) accessible to the view.
    • baseArrayLayer

      public int baseArrayLayer()
      Specified by:
      baseArrayLayer in interface VulkanImageSubresourceRangeType
      Returns:
      The first array layer accessible to the view.
    • layerCount

      public int layerCount()
      Specified by:
      layerCount in interface VulkanImageSubresourceRangeType
      Returns:
      The number of array layers (starting from baseArrayLayer) accessible to the view.
    • withAspectMask

      public final VulkanImageSubresourceRange withAspectMask(VulkanImageAspectFlag... elements)
      Copy the current immutable object with elements that replace the content of aspectMask.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withAspectMask

      public final VulkanImageSubresourceRange withAspectMask(Iterable<VulkanImageAspectFlag> elements)
      Copy the current immutable object with elements that replace the content of aspectMask. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of aspectMask elements to set
      Returns:
      A modified copy or this if not changed
    • withBaseMipLevel

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

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

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

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

      public boolean equals(Object another)
      This instance is equal to all instances of VulkanImageSubresourceRange 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: aspectMask, baseMipLevel, levelCount, baseArrayLayer, layerCount.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static VulkanImageSubresourceRange.Builder builder()
      Creates a builder for VulkanImageSubresourceRange.
      VulkanImageSubresourceRange.builder()
         .addAspectMask|addAllAspectMask(com.io7m.jcoronado.api.VulkanImageAspectFlag) // aspectMask elements
         .setBaseMipLevel(int) // optional baseMipLevel
         .setLevelCount(int) // optional levelCount
         .setBaseArrayLayer(int) // optional baseArrayLayer
         .setLayerCount(int) // optional layerCount
         .build();
      
      Returns:
      A new VulkanImageSubresourceRange builder