public static class Light.Distant extends Light
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:
Light.Distant, Light.Point, Light.Spot| Modifier and Type | Field and Description |
|---|---|
private DoubleProperty |
azimuth
The azimuth of the light.
|
private DoubleProperty |
elevation
The elevation of the light.
|
| Constructor and Description |
|---|
Distant()
Creates a new instance of Distant light with default parameters.
|
Distant(double azimuth,
double elevation,
Color color)
Creates a new instance of Distant light with the specified azimuth,
elevation, and color.
|
| Modifier and Type | Method and Description |
|---|---|
DoubleProperty |
azimuthProperty() |
DoubleProperty |
elevationProperty() |
double |
getAzimuth() |
double |
getElevation() |
(package private) DistantLight |
impl_createImpl() |
(package private) void |
impl_update() |
void |
setAzimuth(double value) |
void |
setElevation(double value) |
colorProperty, effectDirtyProperty, getColor, impl_clearDirty, impl_getImpl, impl_isEffectDirty, impl_markDirty, impl_sync, setColorprivate DoubleProperty azimuth
Min: n/a
Max: n/a
Default: 45.0
Identity: n/a
private DoubleProperty elevation
Min: n/a
Max: n/a
Default: 45.0
Identity: n/a
public Distant()
public Distant(double azimuth,
double elevation,
Color color)
azimuth - the azimuth of the lightelevation - the elevation of the lightcolor - the color of the lightDistantLight impl_createImpl()
impl_createImpl in class Lightpublic final void setAzimuth(double value)
public final double getAzimuth()
public final DoubleProperty azimuthProperty()
public final void setElevation(double value)
public final double getElevation()
public final DoubleProperty elevationProperty()
void impl_update()
impl_update in class Light