Class VulkanImageSubresource
java.lang.Object
com.io7m.jcoronado.api.VulkanImageSubresource
- All Implemented Interfaces:
VulkanImageSubresourceType
Structure specifying an image subresource.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanImageSubresource. -
Method Summary
Modifier and TypeMethodDescriptionintbuilder()Creates a builder forVulkanImageSubresource.static VulkanImageSubresourcecopyOf(VulkanImageSubresourceType instance) Creates an immutable copy of aVulkanImageSubresourceTypevalue.booleanThis instance is equal to all instances ofVulkanImageSubresourcethat have equal attribute values.inthashCode()Computes a hash code from attributes:aspectMask,mipLevel,arrayLayer.intmipLevel()static VulkanImageSubresourceof(Iterable<VulkanImageAspectFlag> aspectMask, int mipLevel, int arrayLayer) Construct a new immutableVulkanImageSubresourceinstance.static VulkanImageSubresourceof(Set<VulkanImageAspectFlag> aspectMask, int mipLevel, int arrayLayer) Construct a new immutableVulkanImageSubresourceinstance.toString()Prints the immutable valueVulkanImageSubresourcewith attribute values.final VulkanImageSubresourcewithArrayLayer(int value) Copy the current immutable object by setting a value for thearrayLayerattribute.final VulkanImageSubresourcewithAspectMask(VulkanImageAspectFlag... elements) Copy the current immutable object with elements that replace the content ofaspectMask.final VulkanImageSubresourcewithAspectMask(Iterable<VulkanImageAspectFlag> elements) Copy the current immutable object with elements that replace the content ofaspectMask.final VulkanImageSubresourcewithMipLevel(int value) Copy the current immutable object by setting a value for themipLevelattribute.
-
Method Details
-
aspectMask
- Specified by:
aspectMaskin interfaceVulkanImageSubresourceType- Returns:
- A set of flags selecting the image aspect.
-
mipLevel
public int mipLevel()- Specified by:
mipLevelin interfaceVulkanImageSubresourceType- Returns:
- The mipmap level.
-
arrayLayer
public int arrayLayer()- Specified by:
arrayLayerin interfaceVulkanImageSubresourceType- Returns:
- The array layer.
-
withAspectMask
Copy the current immutable object with elements that replace the content ofaspectMask.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAspectMask
Copy the current immutable object with elements that replace the content ofaspectMask. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of aspectMask elements to set- Returns:
- A modified copy of
thisobject
-
withMipLevel
Copy the current immutable object by setting a value for themipLevelattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for mipLevel- Returns:
- A modified copy of the
thisobject
-
withArrayLayer
Copy the current immutable object by setting a value for thearrayLayerattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for arrayLayer- Returns:
- A modified copy of the
thisobject
-
equals
-
hashCode
-
toString
-
of
public static VulkanImageSubresource of(Set<VulkanImageAspectFlag> aspectMask, int mipLevel, int arrayLayer) Construct a new immutableVulkanImageSubresourceinstance.- Parameters:
aspectMask- The value for theaspectMaskattributemipLevel- The value for themipLevelattributearrayLayer- The value for thearrayLayerattribute- Returns:
- An immutable VulkanImageSubresource instance
-
of
public static VulkanImageSubresource of(Iterable<VulkanImageAspectFlag> aspectMask, int mipLevel, int arrayLayer) Construct a new immutableVulkanImageSubresourceinstance.- Parameters:
aspectMask- The value for theaspectMaskattributemipLevel- The value for themipLevelattributearrayLayer- The value for thearrayLayerattribute- Returns:
- An immutable VulkanImageSubresource instance
-
copyOf
Creates an immutable copy of aVulkanImageSubresourceTypevalue. 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 VulkanImageSubresource instance
-
builder
Creates a builder forVulkanImageSubresource.VulkanImageSubresource.builder() .addAspectMask|addAllAspectMask(com.io7m.jcoronado.api.VulkanImageAspectFlag) //aspectMaskelements .setMipLevel(int) // requiredmipLevel.setArrayLayer(int) // requiredarrayLayer.build();- Returns:
- A new VulkanImageSubresource builder
-