Class VulkanBufferImageCopy
java.lang.Object
com.io7m.jcoronado.api.VulkanBufferImageCopy
- All Implemented Interfaces:
VulkanBufferImageCopyType
Structure specifying a buffer ↔ image copy operation.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builds instances of typeVulkanBufferImageCopy
. -
Method Summary
Modifier and TypeMethodDescriptionint
long
int
The bufferRowLength and bufferImageHeight specify in texels a subregion of a larger two- or three-dimensional image in buffer memory, and control the addressing calculations.builder()
Creates a builder forVulkanBufferImageCopy
.static VulkanBufferImageCopy
copyOf
(VulkanBufferImageCopyType instance) Creates an immutable copy of aVulkanBufferImageCopyType
value.boolean
This instance is equal to all instances ofVulkanBufferImageCopy
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:bufferOffset
,bufferRowLength
,bufferImageHeight
,imageSubresource
,imageOffset
,imageExtent
.static VulkanBufferImageCopy
of
(long bufferOffset, int bufferRowLength, int bufferImageHeight, VulkanImageSubresourceLayers imageSubresource, VulkanOffset3D imageOffset, VulkanExtent3D imageExtent) Construct a new immutableVulkanBufferImageCopy
instance.toString()
Prints the immutable valueVulkanBufferImageCopy
with attribute values.final VulkanBufferImageCopy
withBufferImageHeight
(int value) Copy the current immutable object by setting a value for thebufferImageHeight
attribute.final VulkanBufferImageCopy
withBufferOffset
(long value) Copy the current immutable object by setting a value for thebufferOffset
attribute.final VulkanBufferImageCopy
withBufferRowLength
(int value) Copy the current immutable object by setting a value for thebufferRowLength
attribute.final VulkanBufferImageCopy
withImageExtent
(VulkanExtent3D value) Copy the current immutable object by setting a value for theimageExtent
attribute.final VulkanBufferImageCopy
withImageOffset
(VulkanOffset3D value) Copy the current immutable object by setting a value for theimageOffset
attribute.final VulkanBufferImageCopy
Copy the current immutable object by setting a value for theimageSubresource
attribute.
-
Method Details
-
bufferOffset
public long bufferOffset()- Specified by:
bufferOffset
in interfaceVulkanBufferImageCopyType
- Returns:
- The offset in bytes from the start of the buffer object where the image data is copied from or to.
-
bufferRowLength
public int bufferRowLength()The bufferRowLength and bufferImageHeight specify in texels a subregion of a larger two- or three-dimensional image in buffer memory, and control the addressing calculations. If either of these values is zero, that aspect of the buffer memory is considered to be tightly packed according to the imageExtent.- Specified by:
bufferRowLength
in interfaceVulkanBufferImageCopyType
- Returns:
- The buffer row length
-
bufferImageHeight
public int bufferImageHeight()- Specified by:
bufferImageHeight
in interfaceVulkanBufferImageCopyType
- Returns:
- The buffer image height
-
imageSubresource
- Specified by:
imageSubresource
in interfaceVulkanBufferImageCopyType
- Returns:
- An image specifying the specific image subresources of the image used for the source or destination image data.
-
imageOffset
- Specified by:
imageOffset
in interfaceVulkanBufferImageCopyType
- Returns:
- The initial x, y, z offsets in texels of the sub-region of the source or destination image data.
-
imageExtent
- Specified by:
imageExtent
in interfaceVulkanBufferImageCopyType
- Returns:
- The size in texels of the image to copy in width, height and depth.
-
withBufferOffset
Copy the current immutable object by setting a value for thebufferOffset
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for bufferOffset- Returns:
- A modified copy of the
this
object
-
withBufferRowLength
Copy the current immutable object by setting a value for thebufferRowLength
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for bufferRowLength- Returns:
- A modified copy of the
this
object
-
withBufferImageHeight
Copy the current immutable object by setting a value for thebufferImageHeight
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for bufferImageHeight- Returns:
- A modified copy of the
this
object
-
withImageSubresource
Copy the current immutable object by setting a value for theimageSubresource
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for imageSubresource- Returns:
- A modified copy of the
this
object
-
withImageOffset
Copy the current immutable object by setting a value for theimageOffset
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for imageOffset- Returns:
- A modified copy of the
this
object
-
withImageExtent
Copy the current immutable object by setting a value for theimageExtent
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for imageExtent- Returns:
- A modified copy of the
this
object
-
equals
-
hashCode
-
toString
-
of
public static VulkanBufferImageCopy of(long bufferOffset, int bufferRowLength, int bufferImageHeight, VulkanImageSubresourceLayers imageSubresource, VulkanOffset3D imageOffset, VulkanExtent3D imageExtent) Construct a new immutableVulkanBufferImageCopy
instance.- Parameters:
bufferOffset
- The value for thebufferOffset
attributebufferRowLength
- The value for thebufferRowLength
attributebufferImageHeight
- The value for thebufferImageHeight
attributeimageSubresource
- The value for theimageSubresource
attributeimageOffset
- The value for theimageOffset
attributeimageExtent
- The value for theimageExtent
attribute- Returns:
- An immutable VulkanBufferImageCopy instance
-
copyOf
Creates an immutable copy of aVulkanBufferImageCopyType
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 VulkanBufferImageCopy instance
-
builder
Creates a builder forVulkanBufferImageCopy
.VulkanBufferImageCopy.builder() .setBufferOffset(long) // required
bufferOffset
.setBufferRowLength(int) // requiredbufferRowLength
.setBufferImageHeight(int) // requiredbufferImageHeight
.setImageSubresource(com.io7m.jcoronado.api.VulkanImageSubresourceLayers) // requiredimageSubresource
.setImageOffset(com.io7m.jcoronado.api.VulkanOffset3D) // requiredimageOffset
.setImageExtent(com.io7m.jcoronado.api.VulkanExtent3D) // requiredimageExtent
.build();- Returns:
- A new VulkanBufferImageCopy builder
-