Class VulkanPipelineRasterizationStateCreateInfo
java.lang.Object
com.io7m.jcoronado.api.VulkanPipelineRasterizationStateCreateInfo
- All Implemented Interfaces:
VulkanPipelineRasterizationStateCreateInfoType
public final class VulkanPipelineRasterizationStateCreateInfo
extends Object
implements VulkanPipelineRasterizationStateCreateInfoType
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanPipelineRasterizationStateCreateInfo. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forVulkanPipelineRasterizationStateCreateInfo.Creates an immutable copy of aVulkanPipelineRasterizationStateCreateInfoTypevalue.cullMode()floatfloatbooleanfloatbooleanbooleanThis instance is equal to all instances ofVulkanPipelineRasterizationStateCreateInfothat have equal attribute values.flags()inthashCode()Computes a hash code from attributes:flags,depthClampEnable,rasterizerDiscardEnable,polygonMode,cullMode,frontFace,depthBiasEnable,depthBiasConstantFactor,depthBiasClamp,depthBiasSlopeFactor,lineWidth.floatof(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 immutableVulkanPipelineRasterizationStateCreateInfoinstance.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 immutableVulkanPipelineRasterizationStateCreateInfoinstance.booleantoString()Prints the immutable valueVulkanPipelineRasterizationStateCreateInfowith attribute values.withCullMode(VulkanCullModeFlag... elements) Copy the current immutable object with elements that replace the content ofcullMode.withCullMode(Iterable<VulkanCullModeFlag> elements) Copy the current immutable object with elements that replace the content ofcullMode.withDepthBiasClamp(float value) Copy the current immutable object by setting a value for thedepthBiasClampattribute.withDepthBiasConstantFactor(float value) Copy the current immutable object by setting a value for thedepthBiasConstantFactorattribute.withDepthBiasEnable(boolean value) Copy the current immutable object by setting a value for thedepthBiasEnableattribute.withDepthBiasSlopeFactor(float value) Copy the current immutable object by setting a value for thedepthBiasSlopeFactorattribute.withDepthClampEnable(boolean value) Copy the current immutable object by setting a value for thedepthClampEnableattribute.withFlags(VulkanPipelineRasterizationStateCreateFlag... elements) Copy the current immutable object with elements that replace the content offlags.Copy the current immutable object with elements that replace the content offlags.withFrontFace(VulkanFrontFace value) Copy the current immutable object by setting a value for thefrontFaceattribute.withLineWidth(float value) Copy the current immutable object by setting a value for thelineWidthattribute.withPolygonMode(VulkanPolygonMode value) Copy the current immutable object by setting a value for thepolygonModeattribute.withRasterizerDiscardEnable(boolean value) Copy the current immutable object by setting a value for therasterizerDiscardEnableattribute.
-
Method Details
-
flags
- Specified by:
flagsin interfaceVulkanPipelineRasterizationStateCreateInfoType- Returns:
- State creation flags
-
depthClampEnable
public boolean depthClampEnable()- Specified by:
depthClampEnablein interfaceVulkanPipelineRasterizationStateCreateInfoType- 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:
rasterizerDiscardEnablein interfaceVulkanPipelineRasterizationStateCreateInfoType- Returns:
- controls whether primitives are discarded immediately before the rasterization stage.
-
polygonMode
- Specified by:
polygonModein interfaceVulkanPipelineRasterizationStateCreateInfoType- Returns:
- the triangle rendering mode.
-
cullMode
- Specified by:
cullModein interfaceVulkanPipelineRasterizationStateCreateInfoType- Returns:
- the triangle facing direction used for primitive culling.
-
frontFace
- Specified by:
frontFacein interfaceVulkanPipelineRasterizationStateCreateInfoType- Returns:
- the front-facing triangle orientation to be used for culling.
-
depthBiasEnable
public boolean depthBiasEnable()- Specified by:
depthBiasEnablein interfaceVulkanPipelineRasterizationStateCreateInfoType- Returns:
- controls whether to bias fragment depth values.
-
depthBiasConstantFactor
public float depthBiasConstantFactor()- Specified by:
depthBiasConstantFactorin interfaceVulkanPipelineRasterizationStateCreateInfoType- Returns:
- a scalar factor controlling the constant depth value added to each fragment.
-
depthBiasClamp
public float depthBiasClamp()- Specified by:
depthBiasClampin interfaceVulkanPipelineRasterizationStateCreateInfoType- Returns:
- the maximum (or minimum) depth bias of a fragment.
-
depthBiasSlopeFactor
public float depthBiasSlopeFactor()- Specified by:
depthBiasSlopeFactorin interfaceVulkanPipelineRasterizationStateCreateInfoType- Returns:
- a scalar factor applied to a fragment’s slope in depth bias calculations.
-
lineWidth
public float lineWidth()- Specified by:
lineWidthin interfaceVulkanPipelineRasterizationStateCreateInfoType- Returns:
- the width of rasterized line segments.
-
withFlags
public final VulkanPipelineRasterizationStateCreateInfo withFlags(VulkanPipelineRasterizationStateCreateFlag... elements) Copy the current immutable object with elements that replace the content offlags.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withFlags
public final VulkanPipelineRasterizationStateCreateInfo withFlags(Iterable<VulkanPipelineRasterizationStateCreateFlag> elements) Copy the current immutable object with elements that replace the content offlags. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of flags elements to set- Returns:
- A modified copy of
thisobject
-
withDepthClampEnable
Copy the current immutable object by setting a value for thedepthClampEnableattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for depthClampEnable- Returns:
- A modified copy of the
thisobject
-
withRasterizerDiscardEnable
Copy the current immutable object by setting a value for therasterizerDiscardEnableattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for rasterizerDiscardEnable- Returns:
- A modified copy of the
thisobject
-
withPolygonMode
Copy the current immutable object by setting a value for thepolygonModeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for polygonMode- Returns:
- A modified copy of the
thisobject
-
withCullMode
public final VulkanPipelineRasterizationStateCreateInfo withCullMode(VulkanCullModeFlag... elements) Copy the current immutable object with elements that replace the content ofcullMode.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withCullMode
public final VulkanPipelineRasterizationStateCreateInfo withCullMode(Iterable<VulkanCullModeFlag> elements) Copy the current immutable object with elements that replace the content ofcullMode. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of cullMode elements to set- Returns:
- A modified copy of
thisobject
-
withFrontFace
Copy the current immutable object by setting a value for thefrontFaceattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for frontFace- Returns:
- A modified copy of the
thisobject
-
withDepthBiasEnable
Copy the current immutable object by setting a value for thedepthBiasEnableattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for depthBiasEnable- Returns:
- A modified copy of the
thisobject
-
withDepthBiasConstantFactor
Copy the current immutable object by setting a value for thedepthBiasConstantFactorattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for depthBiasConstantFactor- Returns:
- A modified copy of the
thisobject
-
withDepthBiasClamp
Copy the current immutable object by setting a value for thedepthBiasClampattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for depthBiasClamp- Returns:
- A modified copy of the
thisobject
-
withDepthBiasSlopeFactor
Copy the current immutable object by setting a value for thedepthBiasSlopeFactorattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for depthBiasSlopeFactor- Returns:
- A modified copy of the
thisobject
-
withLineWidth
Copy the current immutable object by setting a value for thelineWidthattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for lineWidth- Returns:
- A modified copy of the
thisobject
-
equals
-
hashCode
-
toString
-
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 immutableVulkanPipelineRasterizationStateCreateInfoinstance.- Parameters:
flags- The value for theflagsattributedepthClampEnable- The value for thedepthClampEnableattributerasterizerDiscardEnable- The value for therasterizerDiscardEnableattributepolygonMode- The value for thepolygonModeattributecullMode- The value for thecullModeattributefrontFace- The value for thefrontFaceattributedepthBiasEnable- The value for thedepthBiasEnableattributedepthBiasConstantFactor- The value for thedepthBiasConstantFactorattributedepthBiasClamp- The value for thedepthBiasClampattributedepthBiasSlopeFactor- The value for thedepthBiasSlopeFactorattributelineWidth- The value for thelineWidthattribute- 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 immutableVulkanPipelineRasterizationStateCreateInfoinstance.- Parameters:
flags- The value for theflagsattributedepthClampEnable- The value for thedepthClampEnableattributerasterizerDiscardEnable- The value for therasterizerDiscardEnableattributepolygonMode- The value for thepolygonModeattributecullMode- The value for thecullModeattributefrontFace- The value for thefrontFaceattributedepthBiasEnable- The value for thedepthBiasEnableattributedepthBiasConstantFactor- The value for thedepthBiasConstantFactorattributedepthBiasClamp- The value for thedepthBiasClampattributedepthBiasSlopeFactor- The value for thedepthBiasSlopeFactorattributelineWidth- The value for thelineWidthattribute- Returns:
- An immutable VulkanPipelineRasterizationStateCreateInfo instance
-
copyOf
public static VulkanPipelineRasterizationStateCreateInfo copyOf(VulkanPipelineRasterizationStateCreateInfoType instance) Creates an immutable copy of aVulkanPipelineRasterizationStateCreateInfoTypevalue. 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 forVulkanPipelineRasterizationStateCreateInfo.VulkanPipelineRasterizationStateCreateInfo.builder() .addFlags|addAllFlags(com.io7m.jcoronado.api.VulkanPipelineRasterizationStateCreateFlag) //flagselements .setDepthClampEnable(boolean) // requireddepthClampEnable.setRasterizerDiscardEnable(boolean) // requiredrasterizerDiscardEnable.setPolygonMode(com.io7m.jcoronado.api.VulkanPolygonMode) // optionalpolygonMode.addCullMode|addAllCullMode(com.io7m.jcoronado.api.VulkanCullModeFlag) //cullModeelements .setFrontFace(com.io7m.jcoronado.api.VulkanFrontFace) // optionalfrontFace.setDepthBiasEnable(boolean) // requireddepthBiasEnable.setDepthBiasConstantFactor(float) // optionaldepthBiasConstantFactor.setDepthBiasClamp(float) // optionaldepthBiasClamp.setDepthBiasSlopeFactor(float) // optionaldepthBiasSlopeFactor.setLineWidth(float) // optionallineWidth.build();- Returns:
- A new VulkanPipelineRasterizationStateCreateInfo builder
-