Spec-Zone .ru
спецификации, руководства, описания, API
|
public static class Light.Spot extends Light.Point
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:
Type | Property and Description |
---|---|
DoubleProperty |
pointsAtX
The x coordinate of the direction vector for this light.
|
DoubleProperty |
pointsAtY
The y coordinate of the direction vector for this light.
|
DoubleProperty |
pointsAtZ
The z coordinate of the direction vector for this light.
|
DoubleProperty |
specularExponent
The specular exponent, which controls the focus of this
light source.
|
x, y, z
Light.Distant, Light.Point, Light.Spot
Constructor and Description |
---|
Light.Spot()
Creates a new instance of Spot light with default parameters.
|
Light.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.
|
Modifier and Type | Method and Description |
---|---|
double |
getPointsAtX()
Gets the value of the property pointsAtX.
|
double |
getPointsAtY()
Gets the value of the property pointsAtY.
|
double |
getPointsAtZ()
Gets the value of the property pointsAtZ.
|
double |
getSpecularExponent()
Gets the value of the property specularExponent.
|
DoubleProperty |
pointsAtXProperty()
The x coordinate of the direction vector for this light.
|
DoubleProperty |
pointsAtYProperty()
The y coordinate of the direction vector for this light.
|
DoubleProperty |
pointsAtZProperty()
The z coordinate of the direction vector for this light.
|
void |
setPointsAtX(double value)
Sets the value of the property pointsAtX.
|
void |
setPointsAtY(double value)
Sets the value of the property pointsAtY.
|
void |
setPointsAtZ(double value)
Sets the value of the property pointsAtZ.
|
void |
setSpecularExponent(double value)
Sets the value of the property specularExponent.
|
DoubleProperty |
specularExponentProperty()
The specular exponent, which controls the focus of this
light source.
|
getX, getY, getZ, setX, setY, setZ, xProperty, yProperty, zProperty
colorProperty, getColor, setColor
public final DoubleProperty pointsAtXProperty
Min: n/a Max: n/a Default: 0.0 Identity: n/a
getPointsAtX()
,
setPointsAtX(double)
public final DoubleProperty pointsAtYProperty
Min: n/a Max: n/a Default: 0.0 Identity: n/a
getPointsAtY()
,
setPointsAtY(double)
public final DoubleProperty pointsAtZProperty
Min: n/a Max: n/a Default: 0.0 Identity: n/a
getPointsAtZ()
,
setPointsAtZ(double)
public final DoubleProperty specularExponentProperty
Min: 0.0 Max: 4.0 Default: 1.0 Identity: 1.0
getSpecularExponent()
,
setSpecularExponent(double)
public Light.Spot()
public Light.Spot(double x, double y, double z, double specularExponent, Color color)
x
- the x coordinate of the light positiony
- the y coordinate of the light positionz
- the z coordinate of the light positionspecularExponent
- the specular exponent, which controls the
focus of the light sourcecolor
- the color of the lightpublic final void setPointsAtX(double value)
Min: n/a Max: n/a Default: 0.0 Identity: n/a
public final double getPointsAtX()
Min: n/a Max: n/a Default: 0.0 Identity: n/a
public final DoubleProperty pointsAtXProperty()
Min: n/a Max: n/a Default: 0.0 Identity: n/a
getPointsAtX()
,
setPointsAtX(double)
public final void setPointsAtY(double value)
Min: n/a Max: n/a Default: 0.0 Identity: n/a
public final double getPointsAtY()
Min: n/a Max: n/a Default: 0.0 Identity: n/a
public final DoubleProperty pointsAtYProperty()
Min: n/a Max: n/a Default: 0.0 Identity: n/a
getPointsAtY()
,
setPointsAtY(double)
public final void setPointsAtZ(double value)
Min: n/a Max: n/a Default: 0.0 Identity: n/a
public final double getPointsAtZ()
Min: n/a Max: n/a Default: 0.0 Identity: n/a
public final DoubleProperty pointsAtZProperty()
Min: n/a Max: n/a Default: 0.0 Identity: n/a
getPointsAtZ()
,
setPointsAtZ(double)
public final void setSpecularExponent(double value)
Min: 0.0 Max: 4.0 Default: 1.0 Identity: 1.0
public final double getSpecularExponent()
Min: 0.0 Max: 4.0 Default: 1.0 Identity: 1.0
public final DoubleProperty specularExponentProperty()
Min: 0.0 Max: 4.0 Default: 1.0 Identity: 1.0
getSpecularExponent()
,
setSpecularExponent(double)
Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to