Class LightingBuilder
java.lang.Object
io.github.sosuisen.jfxbuilder.graphics.LightingBuilder
The
LightingBuilder
class constructs instances of the Lighting
class
and offers a fluent interface for creating and configuring it.
This class includes a static create
method that accepts the same arguments as the original Lighting
constructor
and returns an instance of the LightingBuilder
.
You can use method chaining to call the builder methods for configuring the Lighting
.
Finally, invoke the build
method to generate an instance of the Lighting
class.
Note that intermediate builder methods are not evaluated until the build
method
is called, meaning they are evaluated lazily.
- Author:
- Hidekazu Kubota <hidekazu.kubota@gmail.com>
-
Method Summary
Modifier and TypeMethodDescriptionApplies a function to the Lighting instance being constructed.build()
Builds and returns an instance of theLighting
class.A builder method that invokes thesetBumpInput
method on the instance being constructed.Applies a function to thebumpInputProperty
of the instance being constructed.contentInput
(Effect value) A builder method that invokes thesetContentInput
method on the instance being constructed.Applies a function to thecontentInputProperty
of the instance being constructed.static LightingBuilder
create()
Returns an instance of theLightingBuilder
.static LightingBuilder
Accepts the constructor arguments ofLighting(Light)
and returns an instance ofLightingBuilder
.diffuseConstant
(double value) A builder method that invokes thesetDiffuseConstant
method on the instance being constructed.Applies a function to thediffuseConstantProperty
of the instance being constructed.A builder method that invokes thesetLight
method on the instance being constructed.Applies a function to thelightProperty
of the instance being constructed.specularConstant
(double value) A builder method that invokes thesetSpecularConstant
method on the instance being constructed.Applies a function to thespecularConstantProperty
of the instance being constructed.specularExponent
(double value) A builder method that invokes thesetSpecularExponent
method on the instance being constructed.Applies a function to thespecularExponentProperty
of the instance being constructed.surfaceScale
(double value) A builder method that invokes thesetSurfaceScale
method on the instance being constructed.Applies a function to thesurfaceScaleProperty
of the instance being constructed.
-
Method Details
-
create
Returns an instance of theLightingBuilder
.- Returns:
- an instance of the
LightingBuilder
.
-
create
Accepts the constructor arguments ofLighting(Light)
and returns an instance ofLightingBuilder
.- Returns:
- an instance of the
LightingBuilder
.
-
build
Builds and returns an instance of theLighting
class.Intermediate builder methods are not evaluated until the
build
method is called; in other words, they are evaluated lazily.- Returns:
- new instance of the
Lighting
class
-
apply
Applies a function to the Lighting instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-
bumpInput
A builder method that invokes thesetBumpInput
method on the instance being constructed.- Returns:
- builder instance
-
contentInput
A builder method that invokes thesetContentInput
method on the instance being constructed.- Returns:
- builder instance
-
diffuseConstant
A builder method that invokes thesetDiffuseConstant
method on the instance being constructed.- Returns:
- builder instance
-
light
A builder method that invokes thesetLight
method on the instance being constructed.- Returns:
- builder instance
-
specularConstant
A builder method that invokes thesetSpecularConstant
method on the instance being constructed.- Returns:
- builder instance
-
specularExponent
A builder method that invokes thesetSpecularExponent
method on the instance being constructed.- Returns:
- builder instance
-
surfaceScale
A builder method that invokes thesetSurfaceScale
method on the instance being constructed.- Returns:
- builder instance
-
bumpInputPropertyApply
Applies a function to thebumpInputProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
contentInputPropertyApply
Applies a function to thecontentInputProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
diffuseConstantPropertyApply
Applies a function to thediffuseConstantProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
lightPropertyApply
Applies a function to thelightProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
specularConstantPropertyApply
Applies a function to thespecularConstantProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
specularExponentPropertyApply
Applies a function to thespecularExponentProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
surfaceScalePropertyApply
Applies a function to thesurfaceScaleProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-