| Modifier and Type | Class and Description |
|---|---|
| public static class | Light.
Represents a distant light source. |
| public static class | Light.
Represents a light source at a given position in 3D space. |
| public static class | Light.
Represents a spot light source at a given position in 3D space, with configurable direction and focus. |
| Modifier and Type | Field and Description |
|---|---|
| private ObjectProperty | color
The color of the light source. |
| private BooleanProperty | |
| private Light |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv final void | |
| public final ObjectProperty | |
| pack-priv abstract Light | |
| pack-priv final BooleanProperty | |
| public final Color | |
| private Color | |
| pack-priv Light | |
| pack-priv boolean | |
| pack-priv final void | |
| public final void | |
| private void | |
| pack-priv void | |
| pack-priv void |
| color | back to summary |
|---|---|
| private ObjectProperty<Color> color The color of the light source.
Min: n/a
Max: n/a
Default: Color.WHITE
Identity: n/a
| |
| effectDirty | back to summary |
|---|---|
| private BooleanProperty effectDirty | |
| peer | back to summary |
|---|---|
| private Light peer | |
| Light | back to summary |
|---|---|
| protected Light() Creates a new Light. | |
| clearDirty | back to summary |
|---|---|
| pack-priv final void clearDirty() | |
| colorProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| createPeer | back to summary |
|---|---|
| pack-priv abstract Light createPeer() | |
| effectDirtyProperty | back to summary |
|---|---|
| pack-priv final BooleanProperty effectDirtyProperty() | |
| getColor | back to summary |
|---|---|
| public final Color getColor() | |
| getColorInternal | back to summary |
|---|---|
| private Color getColorInternal() | |
| getPeer | back to summary |
|---|---|
| pack-priv Light getPeer() | |
| isEffectDirty | back to summary |
|---|---|
| pack-priv boolean isEffectDirty() | |
| markDirty | back to summary |
|---|---|
| pack-priv final void markDirty() | |
| setColor | back to summary |
|---|---|
| public final void setColor(Color value) | |
| setEffectDirty | back to summary |
|---|---|
| private void setEffectDirty(boolean value) | |
| sync | back to summary |
|---|---|
| pack-priv void sync() | |
| update | back to summary |
|---|---|
| pack-priv void update() | |
Example:
Light.Distant light = new Light.Distant();
light.setAzimuth(45.0);
light.setElevation(30.0);
Lighting lighting = new Lighting();
lighting.setLight(light);
lighting.setSurfaceScale(5.0);
Text text = new Text();
text.setText("Distant");
text.setFill(Color.STEELBLUE);
text.setFont(Font.font("null", FontWeight.BOLD, 80));
text.setX(10.0f);
text.setY(10.0f);
text.setTextOrigin(VPos.TOP);
text.setEffect(lighting);
Rectangle rect = new Rectangle(300,150);
rect.setFill(Color.ALICEBLUE);
rect.setEffect(lighting);
The code above produces the following:
| Modifier and Type | Field and Description |
|---|---|
| private DoubleProperty | azimuth
The azimuth of the light. |
| private DoubleProperty | elevation
The elevation of the light. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final DoubleProperty | |
| pack-priv DistantLight | |
| public final DoubleProperty | |
| public final double | |
| public final double | |
| public final void | |
| public final void | |
| pack-priv void |
| azimuth | back to summary |
|---|---|
| private DoubleProperty azimuth The azimuth of the light. The azimuth is the direction angle for the light source on the XY plane, in degrees.
Min: n/a
Max: n/a
Default: 45.0
Identity: n/a
| |
| elevation | back to summary |
|---|---|
| private DoubleProperty elevation The elevation of the light. The elevation is the direction angle for the light source on the YZ plane, in degrees.
Min: n/a
Max: n/a
Default: 45.0
Identity: n/a
| |
| Distant | back to summary |
|---|---|
| public Distant() Creates a new instance of Distant light with default parameters. | |
| Distant | back to summary |
|---|---|
| public Distant(double azimuth, double elevation, Color color) Creates a new instance of Distant light with the specified azimuth, elevation, and color.
| |
| azimuthProperty | back to summary |
|---|---|
| public final DoubleProperty azimuthProperty() | |
| createPeer | back to summary |
|---|---|
| pack-priv DistantLight createPeer() Implements abstract javafx.
| |
| elevationProperty | back to summary |
|---|---|
| public final DoubleProperty elevationProperty() | |
| getAzimuth | back to summary |
|---|---|
| public final double getAzimuth() | |
| getElevation | back to summary |
|---|---|
| public final double getElevation() | |
| setAzimuth | back to summary |
|---|---|
| public final void setAzimuth(double value) | |
| setElevation | back to summary |
|---|---|
| public final void setElevation(double value) | |
| update | back to summary |
|---|---|
| pack-priv void update() Overrides javafx.
| |
Example:
Light.Point light = new Light.Point();
light.setX(100);
light.setY(100);
light.setZ(50);
Lighting lighting = new Lighting();
lighting.setLight(light);
lighting.setSurfaceScale(5.0);
Text text = new Text();
text.setText("Point");
text.setFill(Color.STEELBLUE);
text.setFont(Font.font(null, FontWeight.BOLD, 80));
text.setX(10.0);
text.setY(10.0);
text.setTextOrigin(VPos.TOP);
Rectangle rect = new Rectangle(250, 150);
rect.setFill(Color.ALICEBLUE);
rect.setEffect(lighting);
text.setEffect(lighting);
The code above produces the following:
| Modifier and Type | Field and Description |
|---|---|
| private DoubleProperty | x
The x coordinate of the light position. |
| private DoubleProperty | y
The y coordinate of the light position. |
| private DoubleProperty | z
The z coordinate of the light position. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv PointLight | |
| public final double | |
| public final double | |
| public final double | |
| public final void | |
| public final void | |
| public final void | |
| pack-priv void | |
| public final DoubleProperty | |
| public final DoubleProperty | |
| public final DoubleProperty |
| x | back to summary |
|---|---|
| private DoubleProperty x The x coordinate of the light position.
Min: n/a
Max: n/a
Default: 0.0
Identity: n/a
| |
| y | back to summary |
|---|---|
| private DoubleProperty y The y coordinate of the light position.
Min: n/a
Max: n/a
Default: 0.0
Identity: n/a
| |
| z | back to summary |
|---|---|
| private DoubleProperty z The z coordinate of the light position.
Min: n/a
Max: n/a
Default: 0.0
Identity: n/a
| |
| Point | back to summary |
|---|---|
| public Point() Creates a new instance of Point light with default parameters. | |
| Point | back to summary |
|---|---|
| public Point(double x, double y, double z, Color color) Creates a new instance of Point light with the specified x, y, x, and color.
| |
| createPeer | back to summary |
|---|---|
| pack-priv PointLight createPeer() Implements abstract javafx.
| |
| getX | back to summary |
|---|---|
| public final double getX() | |
| getY | back to summary |
|---|---|
| public final double getY() | |
| getZ | back to summary |
|---|---|
| public final double getZ() | |
| setX | back to summary |
|---|---|
| public final void setX(double value) | |
| setY | back to summary |
|---|---|
| public final void setY(double value) | |
| setZ | back to summary |
|---|---|
| public final void setZ(double value) | |
| update | back to summary |
|---|---|
| pack-priv void update() Overrides javafx.
| |
| xProperty | back to summary |
|---|---|
| public final DoubleProperty xProperty() | |
| yProperty | back to summary |
|---|---|
| public final DoubleProperty yProperty() | |
| zProperty | back to summary |
|---|---|
| public final DoubleProperty zProperty() | |
Example:
Light.Spot light = new Light.Spot();
light.setX(150);
light.setY(100);
light.setZ(80);
light.setPointsAtX(0);
light.setPointsAtY(0);
light.setPointsAtZ(-50);
light.setSpecularExponent(2);
Lighting lighting = new Lighting();
lighting.setLight(light);
lighting.setSurfaceScale(5.0);
Text text = new Text();
text.setText("Spot");
text.setFill(Color.STEELBLUE);
text.setFont(Font.font(null, FontWeight.BOLD, 80));
text.setX(10.0);
text.setY(10.0);
text.setTextOrigin(VPos.TOP);
text.setEffect(lighting);
Rectangle rect = new Rectangle(200, 150);
rect.setFill(Color.ALICEBLUE);
rect.setEffect(lighting);
The code above produces the following:
| Modifier and Type | Field and Description |
|---|---|
| private DoubleProperty | pointsAtX
The x coordinate of the direction vector for this light. |
| private DoubleProperty | pointsAtY
The y coordinate of the direction vector for this light. |
| private DoubleProperty | pointsAtZ
The z coordinate of the direction vector for this light. |
| private DoubleProperty | specularExponent
The specular exponent, which controls the focus of this light source. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | Spot(double
the x coordinate of the light position x, double the y coordinate of the light position y, double the z coordinate of the light position z, double the specular exponent, which controls the
focus of the light source specularExponent, Color the color of the light color)Creates a new instance of Spot light with the specified x, y, z, specularExponent, and color. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv SpotLight | |
| public final double | |
| public final double | |
| public final double | |
| public final double | |
| public final DoubleProperty | |
| public final DoubleProperty | |
| public final DoubleProperty | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final DoubleProperty | |
| pack-priv void |
| pointsAtX | back to summary |
|---|---|
| private DoubleProperty pointsAtX The x coordinate of the direction vector for this light.
Min: n/a
Max: n/a
Default: 0.0
Identity: n/a
| |
| pointsAtY | back to summary |
|---|---|
| private DoubleProperty pointsAtY The y coordinate of the direction vector for this light.
Min: n/a
Max: n/a
Default: 0.0
Identity: n/a
| |
| pointsAtZ | back to summary |
|---|---|
| private DoubleProperty pointsAtZ The z coordinate of the direction vector for this light.
Min: n/a
Max: n/a
Default: 0.0
Identity: n/a
| |
| specularExponent | back to summary |
|---|---|
| private DoubleProperty specularExponent The specular exponent, which controls the focus of this light source.
Min: 0.0
Max: 4.0
Default: 1.0
Identity: 1.0
| |
| Spot | back to summary |
|---|---|
| public Spot() Creates a new instance of Spot light with default parameters. | |
| Spot | back to summary |
|---|---|
| public Spot(double x, double y, double z, double specularExponent, Color color) Creates a new instance of Spot light with the specified x, y, z, specularExponent, and color.
| |
| createPeer | back to summary |
|---|---|
| pack-priv SpotLight createPeer() Overrides javafx.
| |
| getPointsAtX | back to summary |
|---|---|
| public final double getPointsAtX() | |
| getPointsAtY | back to summary |
|---|---|
| public final double getPointsAtY() | |
| getPointsAtZ | back to summary |
|---|---|
| public final double getPointsAtZ() | |
| getSpecularExponent | back to summary |
|---|---|
| public final double getSpecularExponent() | |
| pointsAtXProperty | back to summary |
|---|---|
| public final DoubleProperty pointsAtXProperty() | |
| pointsAtYProperty | back to summary |
|---|---|
| public final DoubleProperty pointsAtYProperty() | |
| pointsAtZProperty | back to summary |
|---|---|
| public final DoubleProperty pointsAtZProperty() | |
| setPointsAtX | back to summary |
|---|---|
| public final void setPointsAtX(double value) | |
| setPointsAtY | back to summary |
|---|---|
| public final void setPointsAtY(double value) | |
| setPointsAtZ | back to summary |
|---|---|
| public final void setPointsAtZ(double value) | |
| setSpecularExponent | back to summary |
|---|---|
| public final void setSpecularExponent(double value) | |
| specularExponentProperty | back to summary |
|---|---|
| public final DoubleProperty specularExponentProperty() | |
| update | back to summary |
|---|---|
| pack-priv void update() Overrides javafx.
| |