Class Light.Point

java.lang.Object
javafx.scene.effect.Light
javafx.scene.effect.Light.Point
Direct Known Subclasses:
Light.Spot
Enclosing class:
Light

public static class Light.Point extends Light
Represents a light source at a given position in 3D space.

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:

The visual effect of point
 Light on text

Since:
JavaFX 2.0