com.io7m.r2.core.shaders.types

## Class R2ShaderParametersLightMutable<M>

- java.lang.Object
- - com.io7m.r2.core.shaders.types.R2ShaderParametersLightMutable<M>

- Type Parameters:
    `M` - generic parameter M
  All Implemented Interfaces:
    R2ShaderParametersLightType<M>

      @Generated(value={"Modifiables.generator","R2ShaderParametersLightType<M>"})
      public final class R2ShaderParametersLightMutable<M>
      extends Object
      implements R2ShaderParametersLightType<M>

  A modifiable implementation of the `R2ShaderParametersLightType` type.

  Use the `create()` static factory methods to create new instances. Use the `toImmutable()` method to convert to canonical immutable instances.

  R2ShaderParametersLightMutable is not thread-safe

  See Also:
    `R2ShaderParametersLight`

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `R2ShaderParametersLightMutable<M>` | `clear()` Clears the object by setting all attributes to their initial values.
    `static <M> R2ShaderParametersLightMutable<M>` | `create()` Construct a modifiable instance of `R2ShaderParametersLightType`.
    `static <M> R2ShaderParametersLightMutable<M>` | `create(com.io7m.jcanephora.texture_unit_allocator.JCGLTextureUnitContextMutableType textureUnitContext, M values, R2MatricesObserverValuesType observerMatrices, com.io7m.jareas.core.AreaInclusiveUnsignedLType viewport)` Construct a modifiable instance of `R2ShaderParametersLightType`.
    `boolean` | `equals(Object another)` This instance is equal to all instances of `R2ShaderParametersLightMutable` that have equal attribute values.
    `R2ShaderParametersLightMutable<M>` | `from(R2ShaderParametersLightType<M> instance)` Fill this modifiable instance with attribute values from the provided `R2ShaderParametersLightType` instance.
    `int` | `hashCode()` Computes a hash code from attributes: `textureUnitContext`, `values`, `observerMatrices`, `viewport`.
    `boolean` | `isInitialized()` Returns `true` if all required attributes are set, indicating that the object is initialized.
    `R2MatricesObserverValuesType` | `observerMatrices()`
    `boolean` | `observerMatricesIsSet()` Returns `true` if the required attribute `observerMatrices` is set.
    `R2ShaderParametersLightMutable<M>` | `setObserverMatrices(R2MatricesObserverValuesType observerMatrices)` Assigns a value to the `observerMatrices` attribute.
    `R2ShaderParametersLightMutable<M>` | `setTextureUnitContext(com.io7m.jcanephora.texture_unit_allocator.JCGLTextureUnitContextMutableType textureUnitContext)` Assigns a value to the `textureUnitContext` attribute.
    `R2ShaderParametersLightMutable<M>` | `setValues(M values)` Assigns a value to the `values` attribute.
    `R2ShaderParametersLightMutable<M>` | `setViewport(com.io7m.jareas.core.AreaInclusiveUnsignedLType viewport)` Assigns a value to the `viewport` attribute.
    `com.io7m.jcanephora.texture_unit_allocator.JCGLTextureUnitContextMutableType` | `textureUnitContext()`
    `boolean` | `textureUnitContextIsSet()` Returns `true` if the required attribute `textureUnitContext` is set.
    `R2ShaderParametersLight<M>` | `toImmutable()` Converts to `R2ShaderParametersLight`.
    `String` | `toString()` Generates a string representation of this `R2ShaderParametersLightType`.
    `R2ShaderParametersLightMutable<M>` | `unsetObserverMatrices()` Reset an attribute to its initial value.
    `R2ShaderParametersLightMutable<M>` | `unsetTextureUnitContext()` Reset an attribute to its initial value.
    `R2ShaderParametersLightMutable<M>` | `unsetValues()` Reset an attribute to its initial value.
    `R2ShaderParametersLightMutable<M>` | `unsetViewport()` Reset an attribute to its initial value.
    `M` | `values()`
    `boolean` | `valuesIsSet()` Returns `true` if the required attribute `values` is set.
    `com.io7m.jareas.core.AreaInclusiveUnsignedLType` | `viewport()` A specification of the viewport to which rendering is occurring.
    `boolean` | `viewportIsSet()` Returns `true` if the required attribute `viewport` is set.

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

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

- - ### Method Detail

    - #### create

          public static <M> R2ShaderParametersLightMutable<M> create(com.io7m.jcanephora.texture_unit_allocator.JCGLTextureUnitContextMutableType textureUnitContext,
                                                                     M values,
                                                                     R2MatricesObserverValuesType observerMatrices,
                                                                     com.io7m.jareas.core.AreaInclusiveUnsignedLType viewport)

      Construct a modifiable instance of `R2ShaderParametersLightType`.
      Type Parameters:
        `M` - generic parameter M
      Parameters:
        `textureUnitContext` - The value for the `textureUnitContext` attribute
        `values` - The value for the `values` attribute
        `observerMatrices` - The value for the `observerMatrices` attribute
        `viewport` - The value for the `viewport` attribute
      Returns:
        A new modifiable instance

    - #### create

          public static <M> R2ShaderParametersLightMutable<M> create()

      Construct a modifiable instance of `R2ShaderParametersLightType`.
      Type Parameters:
        `M` - generic parameter M
      Returns:
        A new modifiable instance

    - #### textureUnitContext

          public final com.io7m.jcanephora.texture_unit_allocator.JCGLTextureUnitContextMutableType textureUnitContext()

      Specified by:
        `textureUnitContext` in interface `R2ShaderParametersLightType<M>`
      Returns:
        The current texture unit context

    - #### values

          public final M values()

      Specified by:
        `values` in interface `R2ShaderParametersLightType<M>`
      Returns:
        The current shader values

    - #### observerMatrices

          public final R2MatricesObserverValuesType observerMatrices()

      Specified by:
        `observerMatrices` in interface `R2ShaderParametersLightType<M>`
      Returns:
        The current observer matrices

    - #### viewport

          public final com.io7m.jareas.core.AreaInclusiveUnsignedLType viewport()

      A specification of the viewport to which rendering is occurring.
      Specified by:
        `viewport` in interface `R2ShaderParametersLightType<M>`
      Returns:
        The current viewport

    - #### clear

          public R2ShaderParametersLightMutable<M> clear()

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

    - #### from

          public R2ShaderParametersLightMutable<M> from(R2ShaderParametersLightType<M> instance)

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

    - #### setTextureUnitContext

          public R2ShaderParametersLightMutable<M> setTextureUnitContext(com.io7m.jcanephora.texture_unit_allocator.JCGLTextureUnitContextMutableType textureUnitContext)

      Assigns a value to the `textureUnitContext` attribute.
      Parameters:
        `textureUnitContext` - The value for textureUnitContext
      Returns:
        `this` for use in a chained invocation

    - #### setValues

          public R2ShaderParametersLightMutable<M> setValues(M values)

      Assigns a value to the `values` attribute.
      Parameters:
        `values` - The value for values
      Returns:
        `this` for use in a chained invocation

    - #### setObserverMatrices

          public R2ShaderParametersLightMutable<M> setObserverMatrices(R2MatricesObserverValuesType observerMatrices)

      Assigns a value to the `observerMatrices` attribute.
      Parameters:
        `observerMatrices` - The value for observerMatrices
      Returns:
        `this` for use in a chained invocation

    - #### setViewport

          public R2ShaderParametersLightMutable<M> setViewport(com.io7m.jareas.core.AreaInclusiveUnsignedLType viewport)

      Assigns a value to the `viewport` attribute.
      Parameters:
        `viewport` - The value for viewport
      Returns:
        `this` for use in a chained invocation

    - #### textureUnitContextIsSet

          public final boolean textureUnitContextIsSet()

      Returns `true` if the required attribute `textureUnitContext` is set.
      Returns:
        `true` if set

    - #### valuesIsSet

          public final boolean valuesIsSet()

      Returns `true` if the required attribute `values` is set.
      Returns:
        `true` if set

    - #### observerMatricesIsSet

          public final boolean observerMatricesIsSet()

      Returns `true` if the required attribute `observerMatrices` is set.
      Returns:
        `true` if set

    - #### viewportIsSet

          public final boolean viewportIsSet()

      Returns `true` if the required attribute `viewport` is set.
      Returns:
        `true` if set

    - #### unsetTextureUnitContext

          public final R2ShaderParametersLightMutable<M> unsetTextureUnitContext()

      Reset an attribute to its initial value.
      Returns:
        `this` for use in a chained invocation

    - #### unsetValues

          public final R2ShaderParametersLightMutable<M> unsetValues()

      Reset an attribute to its initial value.
      Returns:
        `this` for use in a chained invocation

    - #### unsetObserverMatrices

          public final R2ShaderParametersLightMutable<M> unsetObserverMatrices()

      Reset an attribute to its initial value.
      Returns:
        `this` for use in a chained invocation

    - #### unsetViewport

          public final R2ShaderParametersLightMutable<M> unsetViewport()

      Reset an attribute to its initial value.
      Returns:
        `this` for use in a chained invocation

    - #### 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 R2ShaderParametersLight<M> toImmutable()

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

    - #### equals

          public boolean equals(Object another)

      This instance is equal to all instances of `R2ShaderParametersLightMutable` that have equal attribute values. An uninitialized instance is equal only to itself.
      Overrides:
        `equals` in class `Object`
      Returns:
        `true` if `this` is equal to `another` instance

    - #### hashCode

          public int hashCode()

      Computes a hash code from attributes: `textureUnitContext`, `values`, `observerMatrices`, `viewport`.
      Overrides:
        `hashCode` in class `Object`
      Returns:
        hashCode value

    - #### toString

          public String toString()

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

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