public class PhongMaterial extends Material
PhongMaterialクラスは、フォン・シェーディングされたマテリアルを表すプロパティの定義を提供します。 光とその適用先となるMesh表面との相互作用を表します。 PhongMaterialは、拡散成分、鏡面成分、環境および自己照明の観点で光を示します。 幾何学的表面の点の色はこれらの4つの成分の数学関数です。
色は次の式によって計算されます。
for each ambient light source i {
ambient += lightColor[i]
}
for each point light source i {
diffuse += (L[i] . N) * lightColor[i]
specular += ((R[i] . V) ^ (specularPower * intensity(specularMap))) * lightColor[i]
}
color = (ambient + diffuse) * diffuseColor * diffuseMap
+ specular * specularColor * specularMap
+ selfIlluminationMap
lightColor[i]は光源iの色です。L[i]は表面から光源iへのベクトルです。Nは法線ベクトルです(bumpMapが存在する場合はそれを考慮)。R[i]は表面法線を中心としたL[i]の正規化反射ベクトルです。Vは正規化ビュー・ベクトルです。AmbientLight、PointLight| Type | プロパティと説明 |
|---|---|
ObjectProperty<Image> |
bumpMap
RGB
Imageとして格納される通常のマップであるこのPhongMaterialのバンプ・マップ。 |
ObjectProperty<Color> |
diffuseColor
この
PhongMaterialの拡散色。 |
ObjectProperty<Image> |
diffuseMap
この
PhongMaterialの拡散マップ。 |
ObjectProperty<Image> |
selfIlluminationMap
この
PhongMaterialの自己照明マップ。 |
ObjectProperty<Color> |
specularColor
この
PhongMaterialの鏡面色。 |
ObjectProperty<Image> |
specularMap
この
PhongMaterialの鏡面マップ。 |
DoubleProperty |
specularPower
この
PhongMaterialの鏡面力。 |
| コンストラクタと説明 |
|---|
PhongMaterial()
デフォルトのColor.WHITE
diffuseColorプロパティを使用して、PhongMaterialクラスの新しいインスタンスを作成します。 |
PhongMaterial(Color diffuseColor)
diffuseColorプロパティで指定された色を使用して、PhongMaterialクラスの新しいインスタンスを作成します。 |
PhongMaterial(Color diffuseColor, Image diffuseMap, Image specularMap, Image bumpMap, Image selfIlluminationMap)
diffuseColorプロパティで指定された色およびイメージを使用して、PhongMaterialクラスの新しいインスタンスを作成します。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
ObjectProperty<Image> |
bumpMapProperty()
RGB
Imageとして格納される通常のマップであるこのPhongMaterialのバンプ・マップ。 |
ObjectProperty<Color> |
diffuseColorProperty()
この
PhongMaterialの拡散色。 |
ObjectProperty<Image> |
diffuseMapProperty()
この
PhongMaterialの拡散マップ。 |
Image |
getBumpMap()
プロパティbumpMapの値を取得します。
|
Color |
getDiffuseColor()
プロパティdiffuseColorの値を取得します。
|
Image |
getDiffuseMap()
プロパティdiffuseMapの値を取得します。
|
Image |
getSelfIlluminationMap()
プロパティselfIlluminationMapの値を取得します。
|
Color |
getSpecularColor()
プロパティspecularColorの値を取得します。
|
Image |
getSpecularMap()
プロパティspecularMapの値を取得します。
|
double |
getSpecularPower()
プロパティspecularPowerの値を取得します。
|
ObjectProperty<Image> |
selfIlluminationMapProperty()
この
PhongMaterialの自己照明マップ。 |
void |
setBumpMap(Image value)
プロパティbumpMapの値を設定します。
|
void |
setDiffuseColor(Color value)
プロパティdiffuseColorの値を設定します。
|
void |
setDiffuseMap(Image value)
プロパティdiffuseMapの値を設定します。
|
void |
setSelfIlluminationMap(Image value)
プロパティselfIlluminationMapの値を設定します。
|
void |
setSpecularColor(Color value)
プロパティspecularColorの値を設定します。
|
void |
setSpecularMap(Image value)
プロパティspecularMapの値を設定します。
|
void |
setSpecularPower(double value)
プロパティspecularPowerの値を設定します。
|
ObjectProperty<Color> |
specularColorProperty()
この
PhongMaterialの鏡面色。 |
ObjectProperty<Image> |
specularMapProperty()
この
PhongMaterialの鏡面マップ。 |
DoubleProperty |
specularPowerProperty()
この
PhongMaterialの鏡面力。 |
String |
toString() |
public final ObjectProperty<Color> diffuseColorProperty
PhongMaterialの拡散色。getDiffuseColor()、setDiffuseColor(Color)public final ObjectProperty<Color> specularColorProperty
PhongMaterialの鏡面色。getSpecularColor()、setSpecularColor(Color)public final DoubleProperty specularPowerProperty
PhongMaterialの鏡面力。getSpecularPower()、setSpecularPower(double)public final ObjectProperty<Image> diffuseMapProperty
PhongMaterialの拡散マップ。getDiffuseMap()、setDiffuseMap(Image)public final ObjectProperty<Image> specularMapProperty
PhongMaterialの鏡面マップ。getSpecularMap()、setSpecularMap(Image)public final ObjectProperty<Image> bumpMapProperty
Imageとして格納される通常のマップであるこのPhongMaterialのバンプ・マップ。getBumpMap()、setBumpMap(Image)public final ObjectProperty<Image> selfIlluminationMapProperty
PhongMaterialの自己照明マップ。getSelfIlluminationMap()、setSelfIlluminationMap(Image)public PhongMaterial()
diffuseColorプロパティを使用して、PhongMaterialクラスの新しいインスタンスを作成します。public PhongMaterial(Color diffuseColor)
diffuseColorプロパティで指定された色を使用して、PhongMaterialクラスの新しいインスタンスを作成します。diffuseColor - diffuseColorプロパティの色public PhongMaterial(Color diffuseColor, Image diffuseMap, Image specularMap, Image bumpMap, Image selfIlluminationMap)
diffuseColorプロパティで指定された色およびイメージを使用して、PhongMaterialクラスの新しいインスタンスを作成します。diffuseColor - diffuseColorプロパティの色diffuseMap - diffuseMapプロパティのイメージspecularMap - specularMapプロパティのイメージbumpMap - bumpMapプロパティのイメージselfIlluminationMap - selfIlluminationMapプロパティのイメージpublic final void setDiffuseColor(Color value)
PhongMaterialの拡散色。public final Color getDiffuseColor()
PhongMaterialの拡散色。public final ObjectProperty<Color> diffuseColorProperty()
PhongMaterialの拡散色。getDiffuseColor()、setDiffuseColor(Color)public final void setSpecularColor(Color value)
PhongMaterialの鏡面色。public final Color getSpecularColor()
PhongMaterialの鏡面色。public final ObjectProperty<Color> specularColorProperty()
PhongMaterialの鏡面色。getSpecularColor()、setSpecularColor(Color)public final void setSpecularPower(double value)
PhongMaterialの鏡面力。public final double getSpecularPower()
PhongMaterialの鏡面力。public final DoubleProperty specularPowerProperty()
PhongMaterialの鏡面力。getSpecularPower()、setSpecularPower(double)public final void setDiffuseMap(Image value)
PhongMaterialの拡散マップ。public final Image getDiffuseMap()
PhongMaterialの拡散マップ。public final ObjectProperty<Image> diffuseMapProperty()
PhongMaterialの拡散マップ。getDiffuseMap()、setDiffuseMap(Image)public final void setSpecularMap(Image value)
PhongMaterialの鏡面マップ。public final Image getSpecularMap()
PhongMaterialの鏡面マップ。public final ObjectProperty<Image> specularMapProperty()
PhongMaterialの鏡面マップ。getSpecularMap()、setSpecularMap(Image)public final void setBumpMap(Image value)
Imageとして格納される通常のマップであるこのPhongMaterialのバンプ・マップ。public final Image getBumpMap()
Imageとして格納される通常のマップであるこのPhongMaterialのバンプ・マップ。public final ObjectProperty<Image> bumpMapProperty()
Imageとして格納される通常のマップであるこのPhongMaterialのバンプ・マップ。getBumpMap()、setBumpMap(Image)public final void setSelfIlluminationMap(Image value)
PhongMaterialの自己照明マップ。public final Image getSelfIlluminationMap()
PhongMaterialの自己照明マップ。public final ObjectProperty<Image> selfIlluminationMapProperty()
PhongMaterialの自己照明マップ。getSelfIlluminationMap()、setSelfIlluminationMap(Image)Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.