public static class Light.Point extends Light
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:
Light.Distant, Light.Point, Light.Spot
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.
|
Constructor and Description |
---|
Point()
Creates a new instance of Point light with default parameters.
|
Point(double x,
double y,
double z,
Color color)
Creates a new instance of Point light with the specified x, y, x, and
color.
|
Modifier and Type | Method and Description |
---|---|
double |
getX() |
double |
getY() |
double |
getZ() |
(package private) PointLight |
impl_createImpl()
Deprecated.
This is an internal API that is not intended for use and will be removed in the next version
|
(package private) void |
impl_update() |
void |
setX(double value) |
void |
setY(double value) |
void |
setZ(double value) |
DoubleProperty |
xProperty() |
DoubleProperty |
yProperty() |
DoubleProperty |
zProperty() |
colorProperty, effectDirtyProperty, getColor, impl_clearDirty, impl_getImpl, impl_isEffectDirty, impl_markDirty, impl_sync, setColor
private DoubleProperty x
Min: n/a Max: n/a Default: 0.0 Identity: n/a
private DoubleProperty y
Min: n/a Max: n/a Default: 0.0 Identity: n/a
private DoubleProperty z
Min: n/a Max: n/a Default: 0.0 Identity: n/a
public Point()
public Point(double x, double y, double z, Color color)
x
- the x coordinate of the light positiony
- the y coordinate of the light positionz
- the z coordinate of the light positioncolor
- the color of the light@Deprecated PointLight impl_createImpl()
impl_createImpl
in class Light
public final void setX(double value)
public final double getX()
public final DoubleProperty xProperty()
public final void setY(double value)
public final double getY()
public final DoubleProperty yProperty()
public final void setZ(double value)
public final double getZ()
public final DoubleProperty zProperty()
void impl_update()
impl_update
in class Light