本文整理汇总了Java中javafx.scene.paint.PhongMaterial.setSpecularMap方法的典型用法代码示例。如果您正苦于以下问题:Java PhongMaterial.setSpecularMap方法的具体用法?Java PhongMaterial.setSpecularMap怎么用?Java PhongMaterial.setSpecularMap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.paint.PhongMaterial
的用法示例。
在下文中一共展示了PhongMaterial.setSpecularMap方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: clearMaterialAndSetDiffMap
import javafx.scene.paint.PhongMaterial; //导入方法依赖的package包/类
private void clearMaterialAndSetDiffMap(PhongMaterial mat, Image diff){
mat.setBumpMap(null);
mat.setSpecularMap(null);
mat.setSelfIlluminationMap(null);
mat.setDiffuseColor(DEFAULT_DIFFUSE_COLOR);
mat.setSpecularColor(DEFAULT_SPECULAR_COLOR);
mat.setDiffuseMap(diff);
}
示例2: clearMaterialAndSetColor
import javafx.scene.paint.PhongMaterial; //导入方法依赖的package包/类
private void clearMaterialAndSetColor(PhongMaterial mat, Color col){
mat.setBumpMap(null);
mat.setSpecularMap(null);
mat.setSelfIlluminationMap(null);
mat.setDiffuseMap(null);
mat.setDiffuseColor(col);
}
示例3: setMaterial
import javafx.scene.paint.PhongMaterial; //导入方法依赖的package包/类
public static void setMaterial(final Planetoid _planetoid, final String _phongFile) {
final PhongMaterial material = new PhongMaterial();
String diffFile = "", normFile = "", specFile = "";
try {
URL url = MediaHelper.getURLForMedia(_phongFile);
JSONParser parser = new JSONParser();
MediaHelper.addToSearchPath(url.getPath().substring(0, url.getPath().lastIndexOf('/')));
Object obj = parser.parse(MediaHelper.getContentAsString(url));
if(obj == null)
return;
JSONObject jsonObject = (JSONObject) obj;
if((diffFile = (String) jsonObject.get("diffuse")) != null)
material.setDiffuseMap(new Image(MediaHelper.getURLForFile(diffFile).toExternalForm(), MAP_WIDTH, MAP_HEIGHT, true, true));
if((normFile = (String) jsonObject.get("normal")) != null)
material.setBumpMap(new Image(MediaHelper.getURLForFile(normFile).toExternalForm(), MAP_WIDTH, MAP_HEIGHT, true, true));
if((specFile = (String) jsonObject.get("specular")) != null)
material.setSpecularMap(new Image(MediaHelper.getURLForFile(specFile).toExternalForm(), MAP_WIDTH, MAP_HEIGHT, true, true));
} catch(ParseException e) { e.printStackTrace(); }
_planetoid.setMaterial(material);
}
示例4: clearMaterialAndSetDiffMap
import javafx.scene.paint.PhongMaterial; //导入方法依赖的package包/类
private void clearMaterialAndSetDiffMap(PhongMaterial mat, Image diff){
mat.setBumpMap(null);
mat.setSpecularMap(null);
mat.setSelfIlluminationMap(null);
mat.setDiffuseColor(DEFAULT_DIFFUSE_COLOR);
mat.setSpecularColor(DEFAULT_SPECULAR_COLOR);
mat.setDiffuseMap(diff);
}
示例5: clearMaterialAndSetColor
import javafx.scene.paint.PhongMaterial; //导入方法依赖的package包/类
private void clearMaterialAndSetColor(PhongMaterial mat, Color col){
mat.setBumpMap(null);
mat.setSpecularMap(null);
mat.setSelfIlluminationMap(null);
mat.setDiffuseMap(null);
mat.setDiffuseColor(col);
}