com.io7m.r2.core.shaders.provided

## Class R2TranslucentShaderBasicParameters.Builder

- java.lang.Object
- - com.io7m.r2.core.shaders.provided.R2TranslucentShaderBasicParameters.Builder

- Enclosing class:
    R2TranslucentShaderBasicParameters

      public static final class R2TranslucentShaderBasicParameters.Builder
      extends Object

  Builds instances of type `R2TranslucentShaderBasicParameters`. 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
    --- | ---
    `R2TranslucentShaderBasicParameters` | `build()` Builds a new `R2TranslucentShaderBasicParameters`.
    `R2TranslucentShaderBasicParameters.Builder` | `from(R2TranslucentShaderBasicParametersType instance)` Fill a builder with attribute values from the provided `R2TranslucentShaderBasicParametersType` instance.
    `R2TranslucentShaderBasicParameters.Builder` | `setAlbedoColor(com.io7m.jtensors.parameterized.PVectorI4F<R2SpaceRGBAType> albedoColor)` Initializes the value for the `albedoColor` attribute.
    `R2TranslucentShaderBasicParameters.Builder` | `setAlbedoTexture(R2Texture2DUsableType albedoTexture)` Initializes the value for the `albedoTexture` attribute.
    `R2TranslucentShaderBasicParameters.Builder` | `setFadeZFar(float fadeZFar)` Initializes the value for the `fadeZFar` attribute.
    `R2TranslucentShaderBasicParameters.Builder` | `setFadeZNear(float fadeZNear)` Initializes the value for the `fadeZNear` attribute.
    `R2TranslucentShaderBasicParameters.Builder` | `setTextureDefaults(R2TextureDefaultsType textureDefaults)` Initializes the value for the `textureDefaults` attribute.

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

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

- - ### Method Detail

    - #### from

          public final R2TranslucentShaderBasicParameters.Builder from(R2TranslucentShaderBasicParametersType instance)

      Fill a builder with attribute values from the provided `R2TranslucentShaderBasicParametersType` 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

    - #### setTextureDefaults

          public final R2TranslucentShaderBasicParameters.Builder setTextureDefaults(R2TextureDefaultsType textureDefaults)

      Initializes the value for the `textureDefaults` attribute.
      Parameters:
        `textureDefaults` - The value for textureDefaults
      Returns:
        `this` builder for use in a chained invocation

    - #### setAlbedoTexture

          public final R2TranslucentShaderBasicParameters.Builder setAlbedoTexture(R2Texture2DUsableType albedoTexture)

      Initializes the value for the `albedoTexture` attribute.

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

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

    - #### setAlbedoColor

          public final R2TranslucentShaderBasicParameters.Builder setAlbedoColor(com.io7m.jtensors.parameterized.PVectorI4F<R2SpaceRGBAType> albedoColor)

      Initializes the value for the `albedoColor` attribute.

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

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

    - #### setFadeZNear

          public final R2TranslucentShaderBasicParameters.Builder setFadeZNear(float fadeZNear)

      Initializes the value for the `fadeZNear` attribute.

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

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

    - #### setFadeZFar

          public final R2TranslucentShaderBasicParameters.Builder setFadeZFar(float fadeZFar)

      Initializes the value for the `fadeZFar` attribute.

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

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

    - #### build

          public R2TranslucentShaderBasicParameters build()

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

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