- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanBufferImageCopy
-
- All Implemented Interfaces:
VulkanBufferImageCopyType
public final class VulkanBufferImageCopy extends java.lang.Object implements VulkanBufferImageCopyType
Structure specifying a buffer ↔ image copy operation.- See Also:
- "VkBufferImageCopy"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanBufferImageCopy.Builder
Builds instances of typeVulkanBufferImageCopy
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
bufferImageHeight()
long
bufferOffset()
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.static VulkanBufferImageCopy.Builder
builder()
Creates a builder forVulkanBufferImageCopy
.static VulkanBufferImageCopy
copyOf(VulkanBufferImageCopyType instance)
Creates an immutable copy of aVulkanBufferImageCopyType
value.boolean
equals(java.lang.Object another)
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
.VulkanExtent3D
imageExtent()
VulkanOffset3D
imageOffset()
VulkanImageSubresourceLayers
imageSubresource()
static VulkanBufferImageCopy
of(long bufferOffset, int bufferRowLength, int bufferImageHeight, VulkanImageSubresourceLayers imageSubresource, VulkanOffset3D imageOffset, VulkanExtent3D imageExtent)
Construct a new immutableVulkanBufferImageCopy
instance.java.lang.String
toString()
Prints the immutable valueVulkanBufferImageCopy
with attribute values.VulkanBufferImageCopy
withBufferImageHeight(int value)
Copy the current immutable object by setting a value for thebufferImageHeight
attribute.VulkanBufferImageCopy
withBufferOffset(long value)
Copy the current immutable object by setting a value for thebufferOffset
attribute.VulkanBufferImageCopy
withBufferRowLength(int value)
Copy the current immutable object by setting a value for thebufferRowLength
attribute.VulkanBufferImageCopy
withImageExtent(VulkanExtent3D value)
Copy the current immutable object by setting a value for theimageExtent
attribute.VulkanBufferImageCopy
withImageOffset(VulkanOffset3D value)
Copy the current immutable object by setting a value for theimageOffset
attribute.VulkanBufferImageCopy
withImageSubresource(VulkanImageSubresourceLayers value)
Copy the current immutable object by setting a value for theimageSubresource
attribute.
-
-
-
Method Detail
-
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
public VulkanImageSubresourceLayers 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
public VulkanOffset3D 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
public VulkanExtent3D imageExtent()
- Specified by:
imageExtent
in interfaceVulkanBufferImageCopyType
- Returns:
- The size in texels of the image to copy in width, height and depth.
-
withBufferOffset
public final VulkanBufferImageCopy withBufferOffset(long value)
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
public final VulkanBufferImageCopy withBufferRowLength(int value)
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
public final VulkanBufferImageCopy withBufferImageHeight(int value)
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
public final VulkanBufferImageCopy withImageSubresource(VulkanImageSubresourceLayers value)
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
public final VulkanBufferImageCopy withImageOffset(VulkanOffset3D value)
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
public final VulkanBufferImageCopy withImageExtent(VulkanExtent3D value)
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
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanBufferImageCopy
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:bufferOffset
,bufferRowLength
,bufferImageHeight
,imageSubresource
,imageOffset
,imageExtent
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanBufferImageCopy
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
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
public static VulkanBufferImageCopy copyOf(VulkanBufferImageCopyType instance)
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
public static VulkanBufferImageCopy.Builder builder()
Creates a builder forVulkanBufferImageCopy
.- Returns:
- A new VulkanBufferImageCopy builder
-
-