public static class Light.Spot extends Light.Point
例:
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);
前述のコードにより、次の出力が生成されます。
Type | プロパティと説明 |
---|---|
DoubleProperty |
pointsAtX
この光の方向ベクトルのX座標。
|
DoubleProperty |
pointsAtY
この光の方向ベクトルのY座標。
|
DoubleProperty |
pointsAtZ
この光の方向ベクトルのZ座標。
|
DoubleProperty |
specularExponent
この光源の焦点を制御する鏡面指数。
|
x、y、z
Light.Distant、Light.Point、Light.Spot
コンストラクタと説明 |
---|
Spot()
デフォルトのパラメータでスポット・ライトの新しいインスタンスを作成します。
|
Spot(double x, double y, double z, double specularExponent, Color color)
指定されたx、y、z、鏡面指数および色を使用して、スポット光の新しいインスタンスを作成します。
|
修飾子と型 | メソッドと説明 |
---|---|
double |
getPointsAtX()
プロパティpointsAtXの値を取得します。
|
double |
getPointsAtY()
プロパティpointsAtYの値を取得します。
|
double |
getPointsAtZ()
プロパティpointsAtZの値を取得します。
|
double |
getSpecularExponent()
プロパティspecularExponentの値を取得します。
|
DoubleProperty |
pointsAtXProperty()
この光の方向ベクトルのX座標。
|
DoubleProperty |
pointsAtYProperty()
この光の方向ベクトルのY座標。
|
DoubleProperty |
pointsAtZProperty()
この光の方向ベクトルのZ座標。
|
void |
setPointsAtX(double value)
プロパティpointsAtXの値を設定します。
|
void |
setPointsAtY(double value)
プロパティpointsAtYの値を設定します。
|
void |
setPointsAtZ(double value)
プロパティpointsAtZの値を設定します。
|
void |
setSpecularExponent(double value)
プロパティspecularExponentの値を設定します。
|
DoubleProperty |
specularExponentProperty()
この光源の焦点を制御する鏡面指数。
|
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 Spot()
public Spot(double x, double y, double z, double specularExponent, Color color)
x
- 光の位置のX座標y
- 光の位置のY座標z
- 光の位置のZ座標specularExponent
- 光源の焦点を制御する鏡面指数color
- 光の色public 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, 2015, Oracle and/or its affiliates. All rights reserved.