com.io7m.jcanephora.renderstate

## Class JCGLStencilState.Builder

- java.lang.Object
- - com.io7m.jcanephora.renderstate.JCGLStencilState.Builder

- Enclosing class:
    JCGLStencilState

      public static final class JCGLStencilState.Builder
      extends Object

  Builds instances of type `JCGLStencilState`. Initialize attributes and then invoke the `build()` method to create an immutable instance.

  `Builder` is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `JCGLStencilState` | `build()` Builds a new `JCGLStencilState`.
    `JCGLStencilState.Builder` | `from(JCGLStencilStateType instance)` Fill a builder with attribute values from the provided `JCGLStencilStateType` instance.
    `JCGLStencilState.Builder` | `setOperationDepthFailBack(JCGLStencilOperation operationDepthFailBack)` Initializes the value for the `operationDepthFailBack` attribute.
    `JCGLStencilState.Builder` | `setOperationDepthFailFront(JCGLStencilOperation operationDepthFailFront)` Initializes the value for the `operationDepthFailFront` attribute.
    `JCGLStencilState.Builder` | `setOperationPassBack(JCGLStencilOperation operationPassBack)` Initializes the value for the `operationPassBack` attribute.
    `JCGLStencilState.Builder` | `setOperationPassFront(JCGLStencilOperation operationPassFront)` Initializes the value for the `operationPassFront` attribute.
    `JCGLStencilState.Builder` | `setOperationStencilFailBack(JCGLStencilOperation operationStencilFailBack)` Initializes the value for the `operationStencilFailBack` attribute.
    `JCGLStencilState.Builder` | `setOperationStencilFailFront(JCGLStencilOperation operationStencilFailFront)` Initializes the value for the `operationStencilFailFront` attribute.
    `JCGLStencilState.Builder` | `setStencilEnabled(boolean stencilEnabled)` Initializes the value for the `stencilEnabled` attribute.
    `JCGLStencilState.Builder` | `setStencilStrict(boolean stencilStrict)` Initializes the value for the `stencilStrict` attribute.
    `JCGLStencilState.Builder` | `setTestFunctionBack(JCGLStencilFunction testFunctionBack)` Initializes the value for the `testFunctionBack` attribute.
    `JCGLStencilState.Builder` | `setTestFunctionFront(JCGLStencilFunction testFunctionFront)` Initializes the value for the `testFunctionFront` attribute.
    `JCGLStencilState.Builder` | `setTestMaskBack(int testMaskBack)` Initializes the value for the `testMaskBack` attribute.
    `JCGLStencilState.Builder` | `setTestMaskFront(int testMaskFront)` Initializes the value for the `testMaskFront` attribute.
    `JCGLStencilState.Builder` | `setTestReferenceBack(int testReferenceBack)` Initializes the value for the `testReferenceBack` attribute.
    `JCGLStencilState.Builder` | `setTestReferenceFront(int testReferenceFront)` Initializes the value for the `testReferenceFront` attribute.
    `JCGLStencilState.Builder` | `setWriteMaskBackFaces(int writeMaskBackFaces)` Initializes the value for the `writeMaskBackFaces` attribute.
    `JCGLStencilState.Builder` | `setWriteMaskFrontFaces(int writeMaskFrontFaces)` Initializes the value for the `writeMaskFrontFaces` attribute.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### from

          public final JCGLStencilState.Builder from(JCGLStencilStateType instance)

      Fill a builder with attribute values from the provided `JCGLStencilStateType` instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
        `instance` - The instance from which to copy values
      Returns:
        `this` builder for use in a chained invocation

    - #### setStencilEnabled

          public final JCGLStencilState.Builder setStencilEnabled(boolean stencilEnabled)

      Initializes the value for the `stencilEnabled` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `stencilEnabled`.

      Parameters:
        `stencilEnabled` - The value for stencilEnabled
      Returns:
        `this` builder for use in a chained invocation

    - #### setStencilStrict

          public final JCGLStencilState.Builder setStencilStrict(boolean stencilStrict)

      Initializes the value for the `stencilStrict` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `stencilStrict`.

      Parameters:
        `stencilStrict` - The value for stencilStrict
      Returns:
        `this` builder for use in a chained invocation

    - #### setTestFunctionFront

          public final JCGLStencilState.Builder setTestFunctionFront(JCGLStencilFunction testFunctionFront)

      Initializes the value for the `testFunctionFront` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `testFunctionFront`.

      Parameters:
        `testFunctionFront` - The value for testFunctionFront
      Returns:
        `this` builder for use in a chained invocation

    - #### setTestFunctionBack

          public final JCGLStencilState.Builder setTestFunctionBack(JCGLStencilFunction testFunctionBack)

      Initializes the value for the `testFunctionBack` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `testFunctionBack`.

      Parameters:
        `testFunctionBack` - The value for testFunctionBack
      Returns:
        `this` builder for use in a chained invocation

    - #### setTestMaskBack

          public final JCGLStencilState.Builder setTestMaskBack(int testMaskBack)

      Initializes the value for the `testMaskBack` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `testMaskBack`.

      Parameters:
        `testMaskBack` - The value for testMaskBack
      Returns:
        `this` builder for use in a chained invocation

    - #### setTestMaskFront

          public final JCGLStencilState.Builder setTestMaskFront(int testMaskFront)

      Initializes the value for the `testMaskFront` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `testMaskFront`.

      Parameters:
        `testMaskFront` - The value for testMaskFront
      Returns:
        `this` builder for use in a chained invocation

    - #### setTestReferenceBack

          public final JCGLStencilState.Builder setTestReferenceBack(int testReferenceBack)

      Initializes the value for the `testReferenceBack` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `testReferenceBack`.

      Parameters:
        `testReferenceBack` - The value for testReferenceBack
      Returns:
        `this` builder for use in a chained invocation

    - #### setTestReferenceFront

          public final JCGLStencilState.Builder setTestReferenceFront(int testReferenceFront)

      Initializes the value for the `testReferenceFront` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `testReferenceFront`.

      Parameters:
        `testReferenceFront` - The value for testReferenceFront
      Returns:
        `this` builder for use in a chained invocation

    - #### setOperationStencilFailBack

          public final JCGLStencilState.Builder setOperationStencilFailBack(JCGLStencilOperation operationStencilFailBack)

      Initializes the value for the `operationStencilFailBack` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `operationStencilFailBack`.

      Parameters:
        `operationStencilFailBack` - The value for operationStencilFailBack
      Returns:
        `this` builder for use in a chained invocation

    - #### setOperationDepthFailBack

          public final JCGLStencilState.Builder setOperationDepthFailBack(JCGLStencilOperation operationDepthFailBack)

      Initializes the value for the `operationDepthFailBack` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `operationDepthFailBack`.

      Parameters:
        `operationDepthFailBack` - The value for operationDepthFailBack
      Returns:
        `this` builder for use in a chained invocation

    - #### setOperationPassBack

          public final JCGLStencilState.Builder setOperationPassBack(JCGLStencilOperation operationPassBack)

      Initializes the value for the `operationPassBack` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `operationPassBack`.

      Parameters:
        `operationPassBack` - The value for operationPassBack
      Returns:
        `this` builder for use in a chained invocation

    - #### setOperationStencilFailFront

          public final JCGLStencilState.Builder setOperationStencilFailFront(JCGLStencilOperation operationStencilFailFront)

      Initializes the value for the `operationStencilFailFront` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `operationStencilFailFront`.

      Parameters:
        `operationStencilFailFront` - The value for operationStencilFailFront
      Returns:
        `this` builder for use in a chained invocation

    - #### setOperationDepthFailFront

          public final JCGLStencilState.Builder setOperationDepthFailFront(JCGLStencilOperation operationDepthFailFront)

      Initializes the value for the `operationDepthFailFront` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `operationDepthFailFront`.

      Parameters:
        `operationDepthFailFront` - The value for operationDepthFailFront
      Returns:
        `this` builder for use in a chained invocation

    - #### setOperationPassFront

          public final JCGLStencilState.Builder setOperationPassFront(JCGLStencilOperation operationPassFront)

      Initializes the value for the `operationPassFront` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `operationPassFront`.

      Parameters:
        `operationPassFront` - The value for operationPassFront
      Returns:
        `this` builder for use in a chained invocation

    - #### setWriteMaskFrontFaces

          public final JCGLStencilState.Builder setWriteMaskFrontFaces(int writeMaskFrontFaces)

      Initializes the value for the `writeMaskFrontFaces` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `writeMaskFrontFaces`.

      Parameters:
        `writeMaskFrontFaces` - The value for writeMaskFrontFaces
      Returns:
        `this` builder for use in a chained invocation

    - #### setWriteMaskBackFaces

          public final JCGLStencilState.Builder setWriteMaskBackFaces(int writeMaskBackFaces)

      Initializes the value for the `writeMaskBackFaces` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `writeMaskBackFaces`.

      Parameters:
        `writeMaskBackFaces` - The value for writeMaskBackFaces
      Returns:
        `this` builder for use in a chained invocation

    - #### build

          public JCGLStencilState build()

      Builds a new `JCGLStencilState`.
      Returns:
        An immutable instance of JCGLStencilState
      Throws:
        `IllegalStateException` - if any required attributes are missing

Copyright © 2016 <code@io7m.com> http://io7m.com