Class VulkanPipelineDepthStencilStateCreateInfo

java.lang.Object
com.io7m.jcoronado.api.VulkanPipelineDepthStencilStateCreateInfo
All Implemented Interfaces:
VulkanPipelineDepthStencilStateCreateInfoType

public final class VulkanPipelineDepthStencilStateCreateInfo extends Object implements VulkanPipelineDepthStencilStateCreateInfoType
Structure specifying parameters of a newly created pipeline depth stencil state.
See Also:
  • "VkPipelineDepthStencilStateCreateInfo"
  • Method Details

    • flags

      Specified by:
      flags in interface VulkanPipelineDepthStencilStateCreateInfoType
      Returns:
      Creation flags
    • depthTestEnable

      public boolean depthTestEnable()
      Specified by:
      depthTestEnable in interface VulkanPipelineDepthStencilStateCreateInfoType
      Returns:
      true if depth testing is enabled.
    • depthWriteEnable

      public boolean depthWriteEnable()
      Specified by:
      depthWriteEnable in interface VulkanPipelineDepthStencilStateCreateInfoType
      Returns:
      true if depth writing is enabled.
    • depthCompareOp

      public VulkanCompareOp depthCompareOp()
      Specified by:
      depthCompareOp in interface VulkanPipelineDepthStencilStateCreateInfoType
      Returns:
      The comparison operator used in the depth test.
    • depthBoundsTestEnable

      public boolean depthBoundsTestEnable()
      Specified by:
      depthBoundsTestEnable in interface VulkanPipelineDepthStencilStateCreateInfoType
      Returns:
      true if depth bounds testing is enabled.
    • stencilTestEnable

      public boolean stencilTestEnable()
      Specified by:
      stencilTestEnable in interface VulkanPipelineDepthStencilStateCreateInfoType
      Returns:
      true if stencil testing is enabled.
    • front

      public VulkanStencilOpState front()
      Specified by:
      front in interface VulkanPipelineDepthStencilStateCreateInfoType
      Returns:
      The stencil op state for front faces.
    • back

      public VulkanStencilOpState back()
      Specified by:
      back in interface VulkanPipelineDepthStencilStateCreateInfoType
      Returns:
      The stencil op state for back faces.
    • minDepthBounds

      public float minDepthBounds()
      Specified by:
      minDepthBounds in interface VulkanPipelineDepthStencilStateCreateInfoType
      Returns:
      The minimum depth for bounds testing
    • maxDepthBounds

      public float maxDepthBounds()
      Specified by:
      maxDepthBounds in interface VulkanPipelineDepthStencilStateCreateInfoType
      Returns:
      The maximum depth for bounds testing
    • withFlags

      Copy the current immutable object with elements that replace the content of flags.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withFlags

      Copy the current immutable object with elements that replace the content of flags. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of flags elements to set
      Returns:
      A modified copy of this object
    • withDepthTestEnable

      public final VulkanPipelineDepthStencilStateCreateInfo withDepthTestEnable(boolean value)
      Copy the current immutable object by setting a value for the depthTestEnable attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for depthTestEnable
      Returns:
      A modified copy of the this object
    • withDepthWriteEnable

      public final VulkanPipelineDepthStencilStateCreateInfo withDepthWriteEnable(boolean value)
      Copy the current immutable object by setting a value for the depthWriteEnable attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for depthWriteEnable
      Returns:
      A modified copy of the this object
    • withDepthCompareOp

      public final VulkanPipelineDepthStencilStateCreateInfo withDepthCompareOp(VulkanCompareOp value)
      Copy the current immutable object by setting a value for the depthCompareOp attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for depthCompareOp
      Returns:
      A modified copy of the this object
    • withDepthBoundsTestEnable

      public final VulkanPipelineDepthStencilStateCreateInfo withDepthBoundsTestEnable(boolean value)
      Copy the current immutable object by setting a value for the depthBoundsTestEnable attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for depthBoundsTestEnable
      Returns:
      A modified copy of the this object
    • withStencilTestEnable

      public final VulkanPipelineDepthStencilStateCreateInfo withStencilTestEnable(boolean value)
      Copy the current immutable object by setting a value for the stencilTestEnable attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for stencilTestEnable
      Returns:
      A modified copy of the this object
    • withFront

      Copy the current immutable object by setting a value for the front attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for front
      Returns:
      A modified copy of the this object
    • withBack

      Copy the current immutable object by setting a value for the back attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for back
      Returns:
      A modified copy of the this object
    • withMinDepthBounds

      public final VulkanPipelineDepthStencilStateCreateInfo withMinDepthBounds(float value)
      Copy the current immutable object by setting a value for the minDepthBounds attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for minDepthBounds
      Returns:
      A modified copy of the this object
    • withMaxDepthBounds

      public final VulkanPipelineDepthStencilStateCreateInfo withMaxDepthBounds(float value)
      Copy the current immutable object by setting a value for the maxDepthBounds attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for maxDepthBounds
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of VulkanPipelineDepthStencilStateCreateInfo that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: flags, depthTestEnable, depthWriteEnable, depthCompareOp, depthBoundsTestEnable, stencilTestEnable, front, back, minDepthBounds, maxDepthBounds.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value VulkanPipelineDepthStencilStateCreateInfo with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • of

      public static VulkanPipelineDepthStencilStateCreateInfo of(Set<VulkanPipelineDepthStencilStateCreateFlag> flags, boolean depthTestEnable, boolean depthWriteEnable, VulkanCompareOp depthCompareOp, boolean depthBoundsTestEnable, boolean stencilTestEnable, VulkanStencilOpState front, VulkanStencilOpState back, float minDepthBounds, float maxDepthBounds)
      Construct a new immutable VulkanPipelineDepthStencilStateCreateInfo instance.
      Parameters:
      flags - The value for the flags attribute
      depthTestEnable - The value for the depthTestEnable attribute
      depthWriteEnable - The value for the depthWriteEnable attribute
      depthCompareOp - The value for the depthCompareOp attribute
      depthBoundsTestEnable - The value for the depthBoundsTestEnable attribute
      stencilTestEnable - The value for the stencilTestEnable attribute
      front - The value for the front attribute
      back - The value for the back attribute
      minDepthBounds - The value for the minDepthBounds attribute
      maxDepthBounds - The value for the maxDepthBounds attribute
      Returns:
      An immutable VulkanPipelineDepthStencilStateCreateInfo instance
    • of

      public static VulkanPipelineDepthStencilStateCreateInfo of(Iterable<VulkanPipelineDepthStencilStateCreateFlag> flags, boolean depthTestEnable, boolean depthWriteEnable, VulkanCompareOp depthCompareOp, boolean depthBoundsTestEnable, boolean stencilTestEnable, VulkanStencilOpState front, VulkanStencilOpState back, float minDepthBounds, float maxDepthBounds)
      Construct a new immutable VulkanPipelineDepthStencilStateCreateInfo instance.
      Parameters:
      flags - The value for the flags attribute
      depthTestEnable - The value for the depthTestEnable attribute
      depthWriteEnable - The value for the depthWriteEnable attribute
      depthCompareOp - The value for the depthCompareOp attribute
      depthBoundsTestEnable - The value for the depthBoundsTestEnable attribute
      stencilTestEnable - The value for the stencilTestEnable attribute
      front - The value for the front attribute
      back - The value for the back attribute
      minDepthBounds - The value for the minDepthBounds attribute
      maxDepthBounds - The value for the maxDepthBounds attribute
      Returns:
      An immutable VulkanPipelineDepthStencilStateCreateInfo instance
    • copyOf

      Creates an immutable copy of a VulkanPipelineDepthStencilStateCreateInfoType 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 VulkanPipelineDepthStencilStateCreateInfo instance
    • builder

      Creates a builder for VulkanPipelineDepthStencilStateCreateInfo.
       VulkanPipelineDepthStencilStateCreateInfo.builder()
          .addFlags|addAllFlags(com.io7m.jcoronado.api.VulkanPipelineDepthStencilStateCreateFlag) // flags elements
          .setDepthTestEnable(boolean) // required depthTestEnable
          .setDepthWriteEnable(boolean) // required depthWriteEnable
          .setDepthCompareOp(com.io7m.jcoronado.api.VulkanCompareOp) // required depthCompareOp
          .setDepthBoundsTestEnable(boolean) // required depthBoundsTestEnable
          .setStencilTestEnable(boolean) // required stencilTestEnable
          .setFront(com.io7m.jcoronado.api.VulkanStencilOpState) // required front
          .setBack(com.io7m.jcoronado.api.VulkanStencilOpState) // required back
          .setMinDepthBounds(float) // required minDepthBounds
          .setMaxDepthBounds(float) // required maxDepthBounds
          .build();
       
      Returns:
      A new VulkanPipelineDepthStencilStateCreateInfo builder