public static final class R2ShaderSSAOParameters.Builder extends Object
R2ShaderSSAOParameters.
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 |
|---|---|
R2ShaderSSAOParameters |
build()
Builds a new
R2ShaderSSAOParameters. |
R2ShaderSSAOParameters.Builder |
from(R2ShaderSSAOParametersType instance)
Fill a builder with attribute values from the provided
R2ShaderSSAOParametersType instance. |
R2ShaderSSAOParameters.Builder |
setExponent(float exponent)
Initializes the value for the
exponent attribute. |
R2ShaderSSAOParameters.Builder |
setGeometryBuffer(R2GeometryBufferUsableType geometryBuffer)
Initializes the value for the
geometryBuffer attribute. |
R2ShaderSSAOParameters.Builder |
setKernel(R2SSAOKernelType kernel)
Initializes the value for the
kernel attribute. |
R2ShaderSSAOParameters.Builder |
setNoiseTexture(R2Texture2DUsableType noiseTexture)
Initializes the value for the
noiseTexture attribute. |
R2ShaderSSAOParameters.Builder |
setSampleRadius(float sampleRadius)
Initializes the value for the
sampleRadius attribute. |
R2ShaderSSAOParameters.Builder |
setViewMatrices(R2MatricesObserverValuesType viewMatrices)
Initializes the value for the
viewMatrices attribute. |
R2ShaderSSAOParameters.Builder |
setViewport(com.io7m.jareas.core.AreaInclusiveUnsignedLType viewport)
Initializes the value for the
viewport attribute. |
public final R2ShaderSSAOParameters.Builder from(R2ShaderSSAOParametersType instance)
R2ShaderSSAOParametersType instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final R2ShaderSSAOParameters.Builder setExponent(float exponent)
exponent attribute.
If not set, this attribute will have a default value as returned by the initializer of exponent.
exponent - The value for exponentthis builder for use in a chained invocationpublic final R2ShaderSSAOParameters.Builder setSampleRadius(float sampleRadius)
sampleRadius attribute.
If not set, this attribute will have a default value as returned by the initializer of sampleRadius.
sampleRadius - The value for sampleRadiusthis builder for use in a chained invocationpublic final R2ShaderSSAOParameters.Builder setKernel(R2SSAOKernelType kernel)
kernel attribute.kernel - The value for kernelthis builder for use in a chained invocationpublic final R2ShaderSSAOParameters.Builder setNoiseTexture(R2Texture2DUsableType noiseTexture)
noiseTexture attribute.noiseTexture - The value for noiseTexturethis builder for use in a chained invocationpublic final R2ShaderSSAOParameters.Builder setViewport(com.io7m.jareas.core.AreaInclusiveUnsignedLType viewport)
viewport attribute.viewport - The value for viewportthis builder for use in a chained invocationpublic final R2ShaderSSAOParameters.Builder setViewMatrices(R2MatricesObserverValuesType viewMatrices)
viewMatrices attribute.viewMatrices - The value for viewMatricesthis builder for use in a chained invocationpublic final R2ShaderSSAOParameters.Builder setGeometryBuffer(R2GeometryBufferUsableType geometryBuffer)
geometryBuffer attribute.geometryBuffer - The value for geometryBufferthis builder for use in a chained invocationpublic R2ShaderSSAOParameters build()
R2ShaderSSAOParameters.IllegalStateException - if any required attributes are missingCopyright © 2016 <code@io7m.com> http://io7m.com