Class VulkanImageCopy

java.lang.Object
com.io7m.jcoronado.api.VulkanImageCopy
All Implemented Interfaces:
VulkanImageCopyType

public final class VulkanImageCopy extends Object implements VulkanImageCopyType
Structure specifying an image copy operation.
See Also:
  • "VkImageCopy"
  • Method Details

    • sourceSubresource

      public VulkanImageSubresourceLayers sourceSubresource()
      Specified by:
      sourceSubresource in interface VulkanImageCopyType
      Returns:
      The subresource to copy from
    • sourceOffset

      public VulkanOffset3D sourceOffset()
      Specified by:
      sourceOffset in interface VulkanImageCopyType
      Returns:
      The offset of the source region
    • targetSubresource

      public VulkanImageSubresourceLayers targetSubresource()
      Specified by:
      targetSubresource in interface VulkanImageCopyType
      Returns:
      The subresource to copy to
    • targetOffset

      public VulkanOffset3D targetOffset()
      Specified by:
      targetOffset in interface VulkanImageCopyType
      Returns:
      The offset of the target region
    • extent

      public VulkanExtent3D extent()
      Specified by:
      extent in interface VulkanImageCopyType
      Returns:
      The extent of the copied region
    • withSourceSubresource

      public final VulkanImageCopy withSourceSubresource(VulkanImageSubresourceLayers value)
      Copy the current immutable object by setting a value for the sourceSubresource attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for sourceSubresource
      Returns:
      A modified copy of the this object
    • withSourceOffset

      public final VulkanImageCopy withSourceOffset(VulkanOffset3D value)
      Copy the current immutable object by setting a value for the sourceOffset attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for sourceOffset
      Returns:
      A modified copy of the this object
    • withTargetSubresource

      public final VulkanImageCopy withTargetSubresource(VulkanImageSubresourceLayers value)
      Copy the current immutable object by setting a value for the targetSubresource attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for targetSubresource
      Returns:
      A modified copy of the this object
    • withTargetOffset

      public final VulkanImageCopy withTargetOffset(VulkanOffset3D value)
      Copy the current immutable object by setting a value for the targetOffset attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for targetOffset
      Returns:
      A modified copy of the this object
    • withExtent

      public final VulkanImageCopy withExtent(VulkanExtent3D value)
      Copy the current immutable object by setting a value for the extent attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for extent
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of VulkanImageCopy 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: sourceSubresource, sourceOffset, targetSubresource, targetOffset, extent.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static VulkanImageCopy of(VulkanImageSubresourceLayers sourceSubresource, VulkanOffset3D sourceOffset, VulkanImageSubresourceLayers targetSubresource, VulkanOffset3D targetOffset, VulkanExtent3D extent)
      Construct a new immutable VulkanImageCopy instance.
      Parameters:
      sourceSubresource - The value for the sourceSubresource attribute
      sourceOffset - The value for the sourceOffset attribute
      targetSubresource - The value for the targetSubresource attribute
      targetOffset - The value for the targetOffset attribute
      extent - The value for the extent attribute
      Returns:
      An immutable VulkanImageCopy instance
    • copyOf

      public static VulkanImageCopy copyOf(VulkanImageCopyType instance)
      Creates an immutable copy of a VulkanImageCopyType 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 VulkanImageCopy instance
    • builder

      public static VulkanImageCopy.Builder builder()
      Creates a builder for VulkanImageCopy.
       VulkanImageCopy.builder()
          .setSourceSubresource(com.io7m.jcoronado.api.VulkanImageSubresourceLayers) // required sourceSubresource
          .setSourceOffset(com.io7m.jcoronado.api.VulkanOffset3D) // required sourceOffset
          .setTargetSubresource(com.io7m.jcoronado.api.VulkanImageSubresourceLayers) // required targetSubresource
          .setTargetOffset(com.io7m.jcoronado.api.VulkanOffset3D) // required targetOffset
          .setExtent(com.io7m.jcoronado.api.VulkanExtent3D) // required extent
          .build();
       
      Returns:
      A new VulkanImageCopy builder