Class VulkanImageSubresourceRange
java.lang.Object
com.io7m.jcoronado.api.VulkanImageSubresourceRange
- All Implemented Interfaces:
VulkanImageSubresourceRangeType
public final class VulkanImageSubresourceRange
extends Object
implements VulkanImageSubresourceRangeType
Structure specifying a image subresource range.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanImageSubresourceRange. -
Method Summary
Modifier and TypeMethodDescriptionintintbuilder()Creates a builder forVulkanImageSubresourceRange.static VulkanImageSubresourceRangecopyOf(VulkanImageSubresourceRangeType instance) Creates an immutable copy of aVulkanImageSubresourceRangeTypevalue.booleanThis instance is equal to all instances ofVulkanImageSubresourceRangethat have equal attribute values.inthashCode()Computes a hash code from attributes:aspectMask,baseMipLevel,levelCount,baseArrayLayer,layerCount.intinttoString()Prints the immutable valueVulkanImageSubresourceRangewith attribute values.withAspectMask(VulkanImageAspectFlag... elements) Copy the current immutable object with elements that replace the content ofaspectMask.withAspectMask(Iterable<VulkanImageAspectFlag> elements) Copy the current immutable object with elements that replace the content ofaspectMask.withBaseArrayLayer(int value) Copy the current immutable object by setting a value for thebaseArrayLayerattribute.withBaseMipLevel(int value) Copy the current immutable object by setting a value for thebaseMipLevelattribute.withLayerCount(int value) Copy the current immutable object by setting a value for thelayerCountattribute.withLevelCount(int value) Copy the current immutable object by setting a value for thelevelCountattribute.
-
Method Details
-
aspectMask
- Specified by:
aspectMaskin interfaceVulkanImageSubresourceRangeType- Returns:
- The image aspect flags
-
baseMipLevel
public int baseMipLevel()- Specified by:
baseMipLevelin interfaceVulkanImageSubresourceRangeType- Returns:
- The first mipmap level accessible to the view.
-
levelCount
public int levelCount()- Specified by:
levelCountin interfaceVulkanImageSubresourceRangeType- Returns:
- The number of mipmap levels (starting from baseMipLevel) accessible to the view.
-
baseArrayLayer
public int baseArrayLayer()- Specified by:
baseArrayLayerin interfaceVulkanImageSubresourceRangeType- Returns:
- The first array layer accessible to the view.
-
layerCount
public int layerCount()- Specified by:
layerCountin interfaceVulkanImageSubresourceRangeType- Returns:
- The number of array layers (starting from baseArrayLayer) accessible to the view.
-
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 or
thisif not changed
-
withBaseMipLevel
Copy the current immutable object by setting a value for thebaseMipLevelattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for baseMipLevel- Returns:
- A modified copy or the
thisobject
-
withLevelCount
Copy the current immutable object by setting a value for thelevelCountattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for levelCount- Returns:
- A modified copy or the
thisobject
-
withBaseArrayLayer
Copy the current immutable object by setting a value for thebaseArrayLayerattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for baseArrayLayer- Returns:
- A modified copy or the
thisobject
-
withLayerCount
Copy the current immutable object by setting a value for thelayerCountattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for layerCount- Returns:
- A modified copy or the
thisobject
-
equals
-
hashCode
-
toString
-
copyOf
Creates an immutable copy of aVulkanImageSubresourceRangeTypevalue. 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 VulkanImageSubresourceRange instance
-
builder
Creates a builder forVulkanImageSubresourceRange.VulkanImageSubresourceRange.builder() .addAspectMask|addAllAspectMask(com.io7m.jcoronado.api.VulkanImageAspectFlag) //
aspectMaskelements .setBaseMipLevel(int) // optionalbaseMipLevel.setLevelCount(int) // optionallevelCount.setBaseArrayLayer(int) // optionalbaseArrayLayer.setLayerCount(int) // optionallayerCount.build();- Returns:
- A new VulkanImageSubresourceRange builder
-