com.io7m.jcanephora.renderstate

## Class JCGLRenderStateMutable

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

- All Implemented Interfaces:
    JCGLRenderStateType

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

  A modifiable implementation of the `JCGLRenderStateType` type.

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

  JCGLRenderStateMutable is not thread-safe

  See Also:
    `JCGLRenderState`

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `JCGLRenderStateMutable` | `clear()` Clears the object by setting all attributes to their initial values.
    `boolean` | `colorBufferMaskingStateIsSet()` Returns `true` if the default attribute `colorBufferMaskingState` is set.
    `static JCGLRenderStateMutable` | `create()` Construct a modifiable instance of `JCGLRenderStateType`.
    `static JCGLRenderStateMutable` | `create(Optional<JCGLBlendStateType> blendState, Optional<JCGLCullingStateType> cullingState, JCGLColorBufferMaskingStateType colorBufferMaskingState, JCGLPolygonMode polygonMode, Optional<com.io7m.jareas.core.AreaInclusiveUnsignedLType> scissor, JCGLDepthStateType depthState, JCGLStencilStateType stencilState)` Construct a modifiable instance of `JCGLRenderStateType`.
    `boolean` | `depthStateIsSet()` Returns `true` if the default attribute `depthState` is set.
    `boolean` | `equals(Object another)` This instance is equal to all instances of `JCGLRenderStateMutable` that have equal attribute values.
    `JCGLRenderStateMutable` | `from(JCGLRenderStateType instance)` Fill this modifiable instance with attribute values from the provided `JCGLRenderStateType` instance.
    `Optional<JCGLBlendStateType>` | `getBlendState()`
    `JCGLColorBufferMaskingStateType` | `getColorBufferMaskingState()`
    `Optional<JCGLCullingStateType>` | `getCullingState()`
    `JCGLDepthStateType` | `getDepthState()`
    `JCGLPolygonMode` | `getPolygonMode()`
    `Optional<com.io7m.jareas.core.AreaInclusiveUnsignedLType>` | `getScissor()`
    `JCGLStencilStateType` | `getStencilState()`
    `int` | `hashCode()` Computes a hash code from attributes: `blendState`, `cullingState`, `colorBufferMaskingState`, `polygonMode`, `scissor`, `depthState`, `stencilState`.
    `boolean` | `isInitialized()` Returns `true` if all required attributes are set, indicating that the object is initialized.
    `boolean` | `polygonModeIsSet()` Returns `true` if the default attribute `polygonMode` is set.
    `JCGLRenderStateMutable` | `setBlendState(JCGLBlendStateType blendState)` Assigns a present value for the optional `blendState` attribute.
    `JCGLRenderStateMutable` | `setBlendState(Optional<JCGLBlendStateType> blendState)` Assigns an optional value for `blendState`.
    `JCGLRenderStateMutable` | `setColorBufferMaskingState(JCGLColorBufferMaskingStateType colorBufferMaskingState)` Assigns a value to the `colorBufferMaskingState` attribute.
    `JCGLRenderStateMutable` | `setCullingState(JCGLCullingStateType cullingState)` Assigns a present value for the optional `cullingState` attribute.
    `JCGLRenderStateMutable` | `setCullingState(Optional<JCGLCullingStateType> cullingState)` Assigns an optional value for `cullingState`.
    `JCGLRenderStateMutable` | `setDepthState(JCGLDepthStateType depthState)` Assigns a value to the `depthState` attribute.
    `JCGLRenderStateMutable` | `setPolygonMode(JCGLPolygonMode polygonMode)` Assigns a value to the `polygonMode` attribute.
    `JCGLRenderStateMutable` | `setScissor(com.io7m.jareas.core.AreaInclusiveUnsignedLType scissor)` Assigns a present value for the optional `scissor` attribute.
    `JCGLRenderStateMutable` | `setScissor(Optional<com.io7m.jareas.core.AreaInclusiveUnsignedLType> scissor)` Assigns an optional value for `scissor`.
    `JCGLRenderStateMutable` | `setStencilState(JCGLStencilStateType stencilState)` Assigns a value to the `stencilState` attribute.
    `boolean` | `stencilStateIsSet()` Returns `true` if the default attribute `stencilState` is set.
    `JCGLRenderState` | `toImmutable()` Converts to `JCGLRenderState`.
    `String` | `toString()` Generates a string representation of this `JCGLRenderStateType`.

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

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

- - ### Method Detail

    - #### create

          public static JCGLRenderStateMutable create(Optional<JCGLBlendStateType> blendState,
                                                      Optional<JCGLCullingStateType> cullingState,
                                                      JCGLColorBufferMaskingStateType colorBufferMaskingState,
                                                      JCGLPolygonMode polygonMode,
                                                      Optional<com.io7m.jareas.core.AreaInclusiveUnsignedLType> scissor,
                                                      JCGLDepthStateType depthState,
                                                      JCGLStencilStateType stencilState)

      Construct a modifiable instance of `JCGLRenderStateType`.
      Parameters:
        `blendState` - The value for the `blendState` attribute
        `cullingState` - The value for the `cullingState` attribute
        `colorBufferMaskingState` - The value for the `colorBufferMaskingState` attribute
        `polygonMode` - The value for the `polygonMode` attribute
        `scissor` - The value for the `scissor` attribute
        `depthState` - The value for the `depthState` attribute
        `stencilState` - The value for the `stencilState` attribute
      Returns:
        A new modifiable instance

    - #### create

          public static JCGLRenderStateMutable create()

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

    - #### getBlendState

          public final Optional<JCGLBlendStateType> getBlendState()

      Specified by:
        `getBlendState` in interface `JCGLRenderStateType`
      Returns:
        The blending state, if blending is enabled

    - #### getCullingState

          public final Optional<JCGLCullingStateType> getCullingState()

      Specified by:
        `getCullingState` in interface `JCGLRenderStateType`
      Returns:
        The culling state, if culling is enabled

    - #### getColorBufferMaskingState

          public final JCGLColorBufferMaskingStateType getColorBufferMaskingState()

      Specified by:
        `getColorBufferMaskingState` in interface `JCGLRenderStateType`
      Returns:
        The color buffer masking state

    - #### getPolygonMode

          public final JCGLPolygonMode getPolygonMode()

      Specified by:
        `getPolygonMode` in interface `JCGLRenderStateType`
      Returns:
        The polygon rendering mode

    - #### getScissor

          public final Optional<com.io7m.jareas.core.AreaInclusiveUnsignedLType> getScissor()

      Specified by:
        `getScissor` in interface `JCGLRenderStateType`
      Returns:
        The scissor region, if scissoring is enabled

    - #### getDepthState

          public final JCGLDepthStateType getDepthState()

      Specified by:
        `getDepthState` in interface `JCGLRenderStateType`
      Returns:
        The depth buffer state

    - #### getStencilState

          public final JCGLStencilStateType getStencilState()

      Specified by:
        `getStencilState` in interface `JCGLRenderStateType`
      Returns:
        The stencil buffer state

    - #### clear

          public JCGLRenderStateMutable clear()

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

    - #### from

          public JCGLRenderStateMutable from(JCGLRenderStateType instance)

      Fill this modifiable instance with attribute values from the provided `JCGLRenderStateType` 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

    - #### setBlendState

          public JCGLRenderStateMutable setBlendState(JCGLBlendStateType blendState)

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

    - #### setBlendState

          public JCGLRenderStateMutable setBlendState(Optional<JCGLBlendStateType> blendState)

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

    - #### setCullingState

          public JCGLRenderStateMutable setCullingState(JCGLCullingStateType cullingState)

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

    - #### setCullingState

          public JCGLRenderStateMutable setCullingState(Optional<JCGLCullingStateType> cullingState)

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

    - #### setColorBufferMaskingState

          public JCGLRenderStateMutable setColorBufferMaskingState(JCGLColorBufferMaskingStateType colorBufferMaskingState)

      Assigns a value to the `colorBufferMaskingState` attribute.

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

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

    - #### setPolygonMode

          public JCGLRenderStateMutable setPolygonMode(JCGLPolygonMode polygonMode)

      Assigns a value to the `polygonMode` attribute.

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

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

    - #### setScissor

          public JCGLRenderStateMutable setScissor(com.io7m.jareas.core.AreaInclusiveUnsignedLType scissor)

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

    - #### setScissor

          public JCGLRenderStateMutable setScissor(Optional<com.io7m.jareas.core.AreaInclusiveUnsignedLType> scissor)

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

    - #### setDepthState

          public JCGLRenderStateMutable setDepthState(JCGLDepthStateType depthState)

      Assigns a value to the `depthState` attribute.

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

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

    - #### setStencilState

          public JCGLRenderStateMutable setStencilState(JCGLStencilStateType stencilState)

      Assigns a value to the `stencilState` attribute.

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

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

    - #### colorBufferMaskingStateIsSet

          public final boolean colorBufferMaskingStateIsSet()

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

    - #### polygonModeIsSet

          public final boolean polygonModeIsSet()

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

    - #### depthStateIsSet

          public final boolean depthStateIsSet()

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

    - #### stencilStateIsSet

          public final boolean stencilStateIsSet()

      Returns `true` if the default attribute `stencilState` 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 JCGLRenderState toImmutable()

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

    - #### equals

          public boolean equals(Object another)

      This instance is equal to all instances of `JCGLRenderStateMutable` 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: `blendState`, `cullingState`, `colorBufferMaskingState`, `polygonMode`, `scissor`, `depthState`, `stencilState`.
      Overrides:
        `hashCode` in class `Object`
      Returns:
        hashCode value

    - #### toString

          public String toString()

      Generates a string representation of this `JCGLRenderStateType`. 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