Class VulkanPipelineRasterizationStateCreateInfo

java.lang.Object
com.io7m.jcoronado.api.VulkanPipelineRasterizationStateCreateInfo
All Implemented Interfaces:
VulkanPipelineRasterizationStateCreateInfoType

public final class VulkanPipelineRasterizationStateCreateInfo extends Object implements VulkanPipelineRasterizationStateCreateInfoType
See Also:
  • "VkPipelineRasterizationStateCreateInfo"
  • Method Details

    • flags

      Specified by:
      flags in interface VulkanPipelineRasterizationStateCreateInfoType
      Returns:
      State creation flags
    • depthClampEnable

      public boolean depthClampEnable()
      Specified by:
      depthClampEnable in interface VulkanPipelineRasterizationStateCreateInfoType
      Returns:
      controls whether to clamp the fragment’s depth values instead of clipping primitives to the z planes of the frustum.
    • rasterizerDiscardEnable

      public boolean rasterizerDiscardEnable()
      Specified by:
      rasterizerDiscardEnable in interface VulkanPipelineRasterizationStateCreateInfoType
      Returns:
      controls whether primitives are discarded immediately before the rasterization stage.
    • polygonMode

      public VulkanPolygonMode polygonMode()
      Specified by:
      polygonMode in interface VulkanPipelineRasterizationStateCreateInfoType
      Returns:
      the triangle rendering mode.
    • cullMode

      public Set<VulkanCullModeFlag> cullMode()
      Specified by:
      cullMode in interface VulkanPipelineRasterizationStateCreateInfoType
      Returns:
      the triangle facing direction used for primitive culling.
    • frontFace

      public VulkanFrontFace frontFace()
      Specified by:
      frontFace in interface VulkanPipelineRasterizationStateCreateInfoType
      Returns:
      the front-facing triangle orientation to be used for culling.
    • depthBiasEnable

      public boolean depthBiasEnable()
      Specified by:
      depthBiasEnable in interface VulkanPipelineRasterizationStateCreateInfoType
      Returns:
      controls whether to bias fragment depth values.
    • depthBiasConstantFactor

      public float depthBiasConstantFactor()
      Specified by:
      depthBiasConstantFactor in interface VulkanPipelineRasterizationStateCreateInfoType
      Returns:
      a scalar factor controlling the constant depth value added to each fragment.
    • depthBiasClamp

      public float depthBiasClamp()
      Specified by:
      depthBiasClamp in interface VulkanPipelineRasterizationStateCreateInfoType
      Returns:
      the maximum (or minimum) depth bias of a fragment.
    • depthBiasSlopeFactor

      public float depthBiasSlopeFactor()
      Specified by:
      depthBiasSlopeFactor in interface VulkanPipelineRasterizationStateCreateInfoType
      Returns:
      a scalar factor applied to a fragment’s slope in depth bias calculations.
    • lineWidth

      public float lineWidth()
      Specified by:
      lineWidth in interface VulkanPipelineRasterizationStateCreateInfoType
      Returns:
      the width of rasterized line segments.
    • 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
    • withDepthClampEnable

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

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

      public final VulkanPipelineRasterizationStateCreateInfo withPolygonMode(VulkanPolygonMode value)
      Copy the current immutable object by setting a value for the polygonMode attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for polygonMode
      Returns:
      A modified copy of the this object
    • withCullMode

      public final VulkanPipelineRasterizationStateCreateInfo withCullMode(VulkanCullModeFlag... elements)
      Copy the current immutable object with elements that replace the content of cullMode.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withCullMode

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

      public final VulkanPipelineRasterizationStateCreateInfo withFrontFace(VulkanFrontFace value)
      Copy the current immutable object by setting a value for the frontFace attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for frontFace
      Returns:
      A modified copy of the this object
    • withDepthBiasEnable

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

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

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

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

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

      public boolean equals(Object another)
      This instance is equal to all instances of VulkanPipelineRasterizationStateCreateInfo 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, depthClampEnable, rasterizerDiscardEnable, polygonMode, cullMode, frontFace, depthBiasEnable, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor, lineWidth.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static VulkanPipelineRasterizationStateCreateInfo of(Set<VulkanPipelineRasterizationStateCreateFlag> flags, boolean depthClampEnable, boolean rasterizerDiscardEnable, VulkanPolygonMode polygonMode, Set<VulkanCullModeFlag> cullMode, VulkanFrontFace frontFace, boolean depthBiasEnable, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor, float lineWidth)
      Construct a new immutable VulkanPipelineRasterizationStateCreateInfo instance.
      Parameters:
      flags - The value for the flags attribute
      depthClampEnable - The value for the depthClampEnable attribute
      rasterizerDiscardEnable - The value for the rasterizerDiscardEnable attribute
      polygonMode - The value for the polygonMode attribute
      cullMode - The value for the cullMode attribute
      frontFace - The value for the frontFace attribute
      depthBiasEnable - The value for the depthBiasEnable attribute
      depthBiasConstantFactor - The value for the depthBiasConstantFactor attribute
      depthBiasClamp - The value for the depthBiasClamp attribute
      depthBiasSlopeFactor - The value for the depthBiasSlopeFactor attribute
      lineWidth - The value for the lineWidth attribute
      Returns:
      An immutable VulkanPipelineRasterizationStateCreateInfo instance
    • of

      public static VulkanPipelineRasterizationStateCreateInfo of(Iterable<VulkanPipelineRasterizationStateCreateFlag> flags, boolean depthClampEnable, boolean rasterizerDiscardEnable, VulkanPolygonMode polygonMode, Iterable<VulkanCullModeFlag> cullMode, VulkanFrontFace frontFace, boolean depthBiasEnable, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor, float lineWidth)
      Construct a new immutable VulkanPipelineRasterizationStateCreateInfo instance.
      Parameters:
      flags - The value for the flags attribute
      depthClampEnable - The value for the depthClampEnable attribute
      rasterizerDiscardEnable - The value for the rasterizerDiscardEnable attribute
      polygonMode - The value for the polygonMode attribute
      cullMode - The value for the cullMode attribute
      frontFace - The value for the frontFace attribute
      depthBiasEnable - The value for the depthBiasEnable attribute
      depthBiasConstantFactor - The value for the depthBiasConstantFactor attribute
      depthBiasClamp - The value for the depthBiasClamp attribute
      depthBiasSlopeFactor - The value for the depthBiasSlopeFactor attribute
      lineWidth - The value for the lineWidth attribute
      Returns:
      An immutable VulkanPipelineRasterizationStateCreateInfo instance
    • copyOf

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

      Creates a builder for VulkanPipelineRasterizationStateCreateInfo.
       VulkanPipelineRasterizationStateCreateInfo.builder()
          .addFlags|addAllFlags(com.io7m.jcoronado.api.VulkanPipelineRasterizationStateCreateFlag) // flags elements
          .setDepthClampEnable(boolean) // required depthClampEnable
          .setRasterizerDiscardEnable(boolean) // required rasterizerDiscardEnable
          .setPolygonMode(com.io7m.jcoronado.api.VulkanPolygonMode) // optional polygonMode
          .addCullMode|addAllCullMode(com.io7m.jcoronado.api.VulkanCullModeFlag) // cullMode elements
          .setFrontFace(com.io7m.jcoronado.api.VulkanFrontFace) // optional frontFace
          .setDepthBiasEnable(boolean) // required depthBiasEnable
          .setDepthBiasConstantFactor(float) // optional depthBiasConstantFactor
          .setDepthBiasClamp(float) // optional depthBiasClamp
          .setDepthBiasSlopeFactor(float) // optional depthBiasSlopeFactor
          .setLineWidth(float) // optional lineWidth
          .build();
       
      Returns:
      A new VulkanPipelineRasterizationStateCreateInfo builder