com.io7m.jcanephora.renderstate

## Class JCGLDepthStateMutable

- java.lang.Object
- - com.io7m.jcanephora.renderstate.JCGLDepthStateMutable

- All Implemented Interfaces:
    JCGLDepthStateType

      @Generated(value={"Modifiables.generator","JCGLDepthStateType"})
      public final class JCGLDepthStateMutable
      extends Object
      implements JCGLDepthStateType

  A modifiable implementation of the `JCGLDepthStateType` type.

  Use the `create()` static factory methods to create new instances.

  JCGLDepthStateMutable is not thread-safe

  See Also:
    `JCGLDepthState`

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `JCGLDepthStateMutable` | `clear()` Clears the object by setting all attributes to their initial values.
    `static JCGLDepthStateMutable` | `create()` Construct a modifiable instance of `JCGLDepthStateType`.
    `static JCGLDepthStateMutable` | `create(JCGLDepthStrict depthStrict, Optional<JCGLDepthFunction> depthTest, JCGLDepthWriting depthWrite, JCGLDepthClamping depthClamp)` Construct a modifiable instance of `JCGLDepthStateType`.
    `boolean` | `depthClampIsSet()` Returns `true` if the default attribute `depthClamp` is set.
    `boolean` | `depthStrictIsSet()` Returns `true` if the default attribute `depthStrict` is set.
    `boolean` | `depthWriteIsSet()` Returns `true` if the default attribute `depthWrite` is set.
    `boolean` | `equals(Object another)` This instance is equal to all instances of `JCGLDepthStateMutable` that have equal attribute values.
    `JCGLDepthStateMutable` | `from(JCGLDepthStateType instance)` Fill this modifiable instance with attribute values from the provided `JCGLDepthStateType` instance.
    `JCGLDepthClamping` | `getDepthClamp()`
    `JCGLDepthStrict` | `getDepthStrict()` Enable or disable strict mode.
    `Optional<JCGLDepthFunction>` | `getDepthTest()`
    `JCGLDepthWriting` | `getDepthWrite()`
    `int` | `hashCode()` Computes a hash code from attributes: `depthStrict`, `depthTest`, `depthWrite`, `depthClamp`.
    `boolean` | `isInitialized()` Returns `true` if all required attributes are set, indicating that the object is initialized.
    `JCGLDepthStateMutable` | `setDepthClamp(JCGLDepthClamping depthClamp)` Assigns a value to the `depthClamp` attribute.
    `JCGLDepthStateMutable` | `setDepthStrict(JCGLDepthStrict depthStrict)` Assigns a value to the `depthStrict` attribute.
    `JCGLDepthStateMutable` | `setDepthTest(JCGLDepthFunction depthTest)` Assigns a present value for the optional `depthTest` attribute.
    `JCGLDepthStateMutable` | `setDepthTest(Optional<JCGLDepthFunction> depthTest)` Assigns an optional value for `depthTest`.
    `JCGLDepthStateMutable` | `setDepthWrite(JCGLDepthWriting depthWrite)` Assigns a value to the `depthWrite` attribute.
    `JCGLDepthState` | `toImmutable()` Converts to `JCGLDepthState`.
    `String` | `toString()` Generates a string representation of this `JCGLDepthStateType`.

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### create

          public static JCGLDepthStateMutable create(JCGLDepthStrict depthStrict,
                                                     Optional<JCGLDepthFunction> depthTest,
                                                     JCGLDepthWriting depthWrite,
                                                     JCGLDepthClamping depthClamp)

      Construct a modifiable instance of `JCGLDepthStateType`.
      Parameters:
        `depthStrict` - The value for the `depthStrict` attribute
        `depthTest` - The value for the `depthTest` attribute
        `depthWrite` - The value for the `depthWrite` attribute
        `depthClamp` - The value for the `depthClamp` attribute
      Returns:
        A new modifiable instance

    - #### create

          public static JCGLDepthStateMutable create()

      Construct a modifiable instance of `JCGLDepthStateType`.
      Returns:
        A new modifiable instance

    - #### getDepthStrict

          public final JCGLDepthStrict getDepthStrict()

      Enable or disable strict mode. If strict mode is enabled, then attempting to enable depth writing/testing/clamping will fail with an exception if the currently bound framebuffer does not have a depth buffer.
      Specified by:
        `getDepthStrict` in interface `JCGLDepthStateType`
      Returns:
        `JCGLDepthStrict.DEPTH_STRICT_ENABLED` iff strict mode is enabled

    - #### getDepthTest

          public final Optional<JCGLDepthFunction> getDepthTest()

      Specified by:
        `getDepthTest` in interface `JCGLDepthStateType`
      Returns:
        The depth testing function, if testing is enabled

    - #### getDepthWrite

          public final JCGLDepthWriting getDepthWrite()

      Specified by:
        `getDepthWrite` in interface `JCGLDepthStateType`
      Returns:
        `JCGLDepthWriting.DEPTH_WRITE_ENABLED` if depth writing is enabled

    - #### getDepthClamp

          public final JCGLDepthClamping getDepthClamp()

      Specified by:
        `getDepthClamp` in interface `JCGLDepthStateType`
      Returns:
        `JCGLDepthClamping.DEPTH_CLAMP_ENABLED` if depth clamping is enabled

    - #### clear

          public JCGLDepthStateMutable clear()

      Clears the object by setting all attributes to their initial values.
      Returns:
        `this` for use in a chained invocation

    - #### from

          public JCGLDepthStateMutable from(JCGLDepthStateType instance)

      Fill this modifiable instance with attribute values from the provided `JCGLDepthStateType` instance. Regular attribute values will be overridden, i.e. replaced with ones of an instance. Any of the instance's absent optional values will not be copied (will not override current values).
      Parameters:
        `instance` - The instance from which to copy values
      Returns:
        `this` for use in a chained invocation

    - #### setDepthStrict

          public JCGLDepthStateMutable setDepthStrict(JCGLDepthStrict depthStrict)

      Assigns a value to the `depthStrict` attribute.

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

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

    - #### setDepthTest

          public JCGLDepthStateMutable setDepthTest(JCGLDepthFunction depthTest)

      Assigns a present value for the optional `depthTest` attribute.
      Parameters:
        `depthTest` - A value for depthTest
      Returns:
        `this` for use in a chained invocation

    - #### setDepthTest

          public JCGLDepthStateMutable setDepthTest(Optional<JCGLDepthFunction> depthTest)

      Assigns an optional value for `depthTest`.
      Parameters:
        `depthTest` - A value for depthTest
      Returns:
        `this` for use in a chained invocation

    - #### setDepthWrite

          public JCGLDepthStateMutable setDepthWrite(JCGLDepthWriting depthWrite)

      Assigns a value to the `depthWrite` attribute.

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

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

    - #### setDepthClamp

          public JCGLDepthStateMutable setDepthClamp(JCGLDepthClamping depthClamp)

      Assigns a value to the `depthClamp` attribute.

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

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

    - #### depthStrictIsSet

          public final boolean depthStrictIsSet()

      Returns `true` if the default attribute `depthStrict` is set.
      Returns:
        `true` if set

    - #### depthWriteIsSet

          public final boolean depthWriteIsSet()

      Returns `true` if the default attribute `depthWrite` is set.
      Returns:
        `true` if set

    - #### depthClampIsSet

          public final boolean depthClampIsSet()

      Returns `true` if the default attribute `depthClamp` is set.
      Returns:
        `true` if set

    - #### isInitialized

          public final boolean isInitialized()

      Returns `true` if all required attributes are set, indicating that the object is initialized.
      Returns:
        `true` if set

    - #### toImmutable

          public final JCGLDepthState toImmutable()

      Converts to `JCGLDepthState`.
      Returns:
        An immutable instance of JCGLDepthState

    - #### equals

          public boolean equals(Object another)

      This instance is equal to all instances of `JCGLDepthStateMutable` 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: `depthStrict`, `depthTest`, `depthWrite`, `depthClamp`.
      Overrides:
        `hashCode` in class `Object`
      Returns:
        hashCode value

    - #### toString

          public String toString()

      Generates a string representation of this `JCGLDepthStateType`. If uninitialized, some attribute values may appear as question marks.
      Overrides:
        `toString` in class `Object`
      Returns:
        A string representation

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