public static final class R2SurfaceShaderBasicParameters.Builder extends Object
R2SurfaceShaderBasicParameters.
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.
| Modifier and Type | Method and Description |
|---|---|
R2SurfaceShaderBasicParameters |
build()
Builds a new
R2SurfaceShaderBasicParameters. |
R2SurfaceShaderBasicParameters.Builder |
from(R2SurfaceShaderBasicParametersType instance)
Fill a builder with attribute values from the provided
com.io7m.r2.core.shaders.provided.R2SurfaceShaderBasicParametersType instance. |
R2SurfaceShaderBasicParameters.Builder |
from(R2SurfaceShaderBasicParametersValuesType instance)
Fill a builder with attribute values from the provided
com.io7m.r2.core.shaders.provided.R2SurfaceShaderBasicParametersValuesType instance. |
R2SurfaceShaderBasicParameters.Builder |
setAlbedoColor(com.io7m.jtensors.parameterized.PVectorI4F<R2SpaceRGBAType> albedoColor)
Initializes the value for the
albedoColor attribute. |
R2SurfaceShaderBasicParameters.Builder |
setAlbedoMix(float albedoMix)
Initializes the value for the
albedoMix attribute. |
R2SurfaceShaderBasicParameters.Builder |
setAlbedoTexture(R2Texture2DUsableType albedoTexture)
Initializes the value for the
albedoTexture attribute. |
R2SurfaceShaderBasicParameters.Builder |
setAlphaDiscardThreshold(float alphaDiscardThreshold)
Initializes the value for the
alphaDiscardThreshold attribute. |
R2SurfaceShaderBasicParameters.Builder |
setEmission(float emission)
Initializes the value for the
emission attribute. |
R2SurfaceShaderBasicParameters.Builder |
setEmissionTexture(R2Texture2DUsableType emissionTexture)
Initializes the value for the
emissionTexture attribute. |
R2SurfaceShaderBasicParameters.Builder |
setNormalTexture(R2Texture2DUsableType normalTexture)
Initializes the value for the
normalTexture attribute. |
R2SurfaceShaderBasicParameters.Builder |
setSpecularColor(com.io7m.jtensors.parameterized.PVectorI3F<R2SpaceRGBType> specularColor)
Initializes the value for the
specularColor attribute. |
R2SurfaceShaderBasicParameters.Builder |
setSpecularExponent(float specularExponent)
Initializes the value for the
specularExponent attribute. |
R2SurfaceShaderBasicParameters.Builder |
setSpecularTexture(R2Texture2DUsableType specularTexture)
Initializes the value for the
specularTexture attribute. |
R2SurfaceShaderBasicParameters.Builder |
setTextureDefaults(R2TextureDefaultsType textureDefaults)
Initializes the value for the
textureDefaults attribute. |
public final R2SurfaceShaderBasicParameters.Builder from(R2SurfaceShaderBasicParametersValuesType instance)
com.io7m.r2.core.shaders.provided.R2SurfaceShaderBasicParametersValuesType instance.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final R2SurfaceShaderBasicParameters.Builder from(R2SurfaceShaderBasicParametersType instance)
com.io7m.r2.core.shaders.provided.R2SurfaceShaderBasicParametersType instance.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final R2SurfaceShaderBasicParameters.Builder setTextureDefaults(R2TextureDefaultsType textureDefaults)
textureDefaults attribute.textureDefaults - The value for textureDefaultsthis builder for use in a chained invocationpublic final R2SurfaceShaderBasicParameters.Builder setAlbedoColor(com.io7m.jtensors.parameterized.PVectorI4F<R2SpaceRGBAType> albedoColor)
albedoColor attribute.
If not set, this attribute will have a default value as returned by the initializer of albedoColor.
albedoColor - The value for albedoColorthis builder for use in a chained invocationpublic final R2SurfaceShaderBasicParameters.Builder setSpecularColor(com.io7m.jtensors.parameterized.PVectorI3F<R2SpaceRGBType> specularColor)
specularColor attribute.
If not set, this attribute will have a default value as returned by the initializer of specularColor.
specularColor - The value for specularColorthis builder for use in a chained invocationpublic final R2SurfaceShaderBasicParameters.Builder setEmission(float emission)
emission attribute.
If not set, this attribute will have a default value as returned by the initializer of emission.
emission - The value for emissionthis builder for use in a chained invocationpublic final R2SurfaceShaderBasicParameters.Builder setEmissionTexture(R2Texture2DUsableType emissionTexture)
emissionTexture attribute.
If not set, this attribute will have a default value as returned by the initializer of emissionTexture.
emissionTexture - The value for emissionTexturethis builder for use in a chained invocationpublic final R2SurfaceShaderBasicParameters.Builder setAlbedoTexture(R2Texture2DUsableType albedoTexture)
albedoTexture attribute.
If not set, this attribute will have a default value as returned by the initializer of albedoTexture.
albedoTexture - The value for albedoTexturethis builder for use in a chained invocationpublic final R2SurfaceShaderBasicParameters.Builder setAlbedoMix(float albedoMix)
albedoMix attribute.
If not set, this attribute will have a default value as returned by the initializer of albedoMix.
albedoMix - The value for albedoMixthis builder for use in a chained invocationpublic final R2SurfaceShaderBasicParameters.Builder setSpecularTexture(R2Texture2DUsableType specularTexture)
specularTexture attribute.
If not set, this attribute will have a default value as returned by the initializer of specularTexture.
specularTexture - The value for specularTexturethis builder for use in a chained invocationpublic final R2SurfaceShaderBasicParameters.Builder setSpecularExponent(float specularExponent)
specularExponent attribute.
If not set, this attribute will have a default value as returned by the initializer of specularExponent.
specularExponent - The value for specularExponentthis builder for use in a chained invocationpublic final R2SurfaceShaderBasicParameters.Builder setNormalTexture(R2Texture2DUsableType normalTexture)
normalTexture attribute.
If not set, this attribute will have a default value as returned by the initializer of normalTexture.
normalTexture - The value for normalTexturethis builder for use in a chained invocationpublic final R2SurfaceShaderBasicParameters.Builder setAlphaDiscardThreshold(float alphaDiscardThreshold)
alphaDiscardThreshold attribute.
If not set, this attribute will have a default value as returned by the initializer of alphaDiscardThreshold.
alphaDiscardThreshold - The value for alphaDiscardThresholdthis builder for use in a chained invocationpublic R2SurfaceShaderBasicParameters build()
R2SurfaceShaderBasicParameters.IllegalStateException - if any required attributes are missingCopyright © 2016 <code@io7m.com> http://io7m.com