Class VulkanImageCopy
java.lang.Object
com.io7m.jcoronado.api.VulkanImageCopy
- All Implemented Interfaces:
VulkanImageCopyType
Structure specifying an image copy operation.
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic VulkanImageCopy.Builder
builder()
Creates a builder forVulkanImageCopy
.static VulkanImageCopy
copyOf
(VulkanImageCopyType instance) Creates an immutable copy of aVulkanImageCopyType
value.boolean
This instance is equal to all instances ofVulkanImageCopy
that have equal attribute values.extent()
int
hashCode()
Computes a hash code from attributes:sourceSubresource
,sourceOffset
,targetSubresource
,targetOffset
,extent
.static VulkanImageCopy
of
(VulkanImageSubresourceLayers sourceSubresource, VulkanOffset3D sourceOffset, VulkanImageSubresourceLayers targetSubresource, VulkanOffset3D targetOffset, VulkanExtent3D extent) Construct a new immutableVulkanImageCopy
instance.toString()
Prints the immutable valueVulkanImageCopy
with attribute values.final VulkanImageCopy
withExtent
(VulkanExtent3D value) Copy the current immutable object by setting a value for theextent
attribute.final VulkanImageCopy
withSourceOffset
(VulkanOffset3D value) Copy the current immutable object by setting a value for thesourceOffset
attribute.final VulkanImageCopy
Copy the current immutable object by setting a value for thesourceSubresource
attribute.final VulkanImageCopy
withTargetOffset
(VulkanOffset3D value) Copy the current immutable object by setting a value for thetargetOffset
attribute.final VulkanImageCopy
Copy the current immutable object by setting a value for thetargetSubresource
attribute.
-
Method Details
-
sourceSubresource
- Specified by:
sourceSubresource
in interfaceVulkanImageCopyType
- Returns:
- The subresource to copy from
-
sourceOffset
- Specified by:
sourceOffset
in interfaceVulkanImageCopyType
- Returns:
- The offset of the source region
-
targetSubresource
- Specified by:
targetSubresource
in interfaceVulkanImageCopyType
- Returns:
- The subresource to copy to
-
targetOffset
- Specified by:
targetOffset
in interfaceVulkanImageCopyType
- Returns:
- The offset of the target region
-
extent
- Specified by:
extent
in interfaceVulkanImageCopyType
- Returns:
- The extent of the copied region
-
withSourceSubresource
Copy the current immutable object by setting a value for thesourceSubresource
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for sourceSubresource- Returns:
- A modified copy of the
this
object
-
withSourceOffset
Copy the current immutable object by setting a value for thesourceOffset
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for sourceOffset- Returns:
- A modified copy of the
this
object
-
withTargetSubresource
Copy the current immutable object by setting a value for thetargetSubresource
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for targetSubresource- Returns:
- A modified copy of the
this
object
-
withTargetOffset
Copy the current immutable object by setting a value for thetargetOffset
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for targetOffset- Returns:
- A modified copy of the
this
object
-
withExtent
Copy the current immutable object by setting a value for theextent
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for extent- Returns:
- A modified copy of the
this
object
-
equals
-
hashCode
-
toString
-
of
public static VulkanImageCopy of(VulkanImageSubresourceLayers sourceSubresource, VulkanOffset3D sourceOffset, VulkanImageSubresourceLayers targetSubresource, VulkanOffset3D targetOffset, VulkanExtent3D extent) Construct a new immutableVulkanImageCopy
instance.- Parameters:
sourceSubresource
- The value for thesourceSubresource
attributesourceOffset
- The value for thesourceOffset
attributetargetSubresource
- The value for thetargetSubresource
attributetargetOffset
- The value for thetargetOffset
attributeextent
- The value for theextent
attribute- Returns:
- An immutable VulkanImageCopy instance
-
copyOf
Creates an immutable copy of aVulkanImageCopyType
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
Creates a builder forVulkanImageCopy
.VulkanImageCopy.builder() .setSourceSubresource(com.io7m.jcoronado.api.VulkanImageSubresourceLayers) // required
sourceSubresource
.setSourceOffset(com.io7m.jcoronado.api.VulkanOffset3D) // requiredsourceOffset
.setTargetSubresource(com.io7m.jcoronado.api.VulkanImageSubresourceLayers) // requiredtargetSubresource
.setTargetOffset(com.io7m.jcoronado.api.VulkanOffset3D) // requiredtargetOffset
.setExtent(com.io7m.jcoronado.api.VulkanExtent3D) // requiredextent
.build();- Returns:
- A new VulkanImageCopy builder
-