当前位置: 首页>>代码示例>>Java>>正文


Java PhongMaterial.setSpecularPower方法代码示例

本文整理汇总了Java中javafx.scene.paint.PhongMaterial.setSpecularPower方法的典型用法代码示例。如果您正苦于以下问题:Java PhongMaterial.setSpecularPower方法的具体用法?Java PhongMaterial.setSpecularPower怎么用?Java PhongMaterial.setSpecularPower使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javafx.scene.paint.PhongMaterial的用法示例。


在下文中一共展示了PhongMaterial.setSpecularPower方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildGroup

import javafx.scene.paint.PhongMaterial; //导入方法依赖的package包/类
protected Group buildGroup() {
        material = new PhongMaterial();
        material.setDiffuseColor(Color.ANTIQUEWHITE);
        material.setSpecularColor(Color.rgb(255, 255, 255));
        material.setSpecularPower(4);
        ss = new SemiSphere(2, 120, 120);
        Shape3D sh = ss.getMesh();
//        Shape3D sh = new Sphere();
        sh.setMaterial(material);
        sh.setScaleX(SCALE);
        sh.setScaleY(SCALE);
        sh.setScaleZ(SCALE);
        light1Group = new Group();
        light2Group = new Group();
        light1mv = new GroupMover(light1Group);
        light2mv = new GroupMover(light2Group);
        root = new Group(light1mv.getGroup(), light2mv.getGroup(), ss.getGroup());
        rootmv = new GroupMover(root);
        return rootmv.getGroup();
    }
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:21,代码来源:MultipleLightingTestApp.java

示例2: setMaterials

import javafx.scene.paint.PhongMaterial; //导入方法依赖的package包/类
/**
 * Sets the specified nodes with the materials given in the map
 * 
 * @param nodes
 *            The nodes to set the materials for
 * @param materialMap
 *            A mapping of the material name to the acctual material
 */
private void setMaterials(List<INode> nodes,
		Map<String, Material> materialMap) {
	if (nodes != null && !nodes.isEmpty()
			&& !materialMap.keySet().isEmpty()) {
		// Get the set of render elements from the view
		IRenderElementHolder holder = view.getHolder();
		for (INode node : nodes) {
			// Get the render of the new shape
			IRenderElement render = holder.getRender(node);

			if (render.getBase() instanceof Shape) {
				// Get the material
				PhongMaterial newMat = new PhongMaterial();
				Material readMat = materialMap
						.get(((Shape) render.getBase()).getMaterial()
								.getPhongMatName());
				if (readMat != null) {
					// Convert values to the phong material
					newMat.setDiffuseColor(
							convertColor(readMat.getDiffuse()));
					newMat.setSpecularColor(
							convertColor(readMat.getSpecular()));
					newMat.setSpecularPower(readMat.getSpecularExponent());
					render.setProperty("material", newMat);
				}
			}
		}
	}
}
 
开发者ID:eclipse,项目名称:eavp,代码行数:38,代码来源:ActionImportGeometry.java

示例3: getMaterialWithColor

import javafx.scene.paint.PhongMaterial; //导入方法依赖的package包/类
public Material getMaterialWithColor(Color color, String image){
        PhongMaterial mat = new PhongMaterial(color);
        if(image!=null && !image.isEmpty()){
            Image img = new Image(image);
            mat.setDiffuseMap(img);
            NormalMap normal = new NormalMap(img);
//            normal.setIntensity(10);
//            normal.setIntensityScale(2);
            mat.setBumpMap(normal);
        }
        mat.setSpecularPower(32);
        mat.setSpecularColor(Color.WHITE);
        return mat;
    }
 
开发者ID:sanke69,项目名称:fr.xs.jtk,代码行数:15,代码来源:TriangleMeshHelper.java

示例4: getMaterialWithPattern

import javafx.scene.paint.PhongMaterial; //导入方法依赖的package包/类
public Material getMaterialWithPattern(){
    PhongMaterial mat = new PhongMaterial();
    mat.setDiffuseMap(getPatternImage());
    mat.setSpecularPower(32);
    mat.setDiffuseColor(Color.WHITE);
    mat.setSpecularColor(Color.WHITE);
    return mat;
}
 
开发者ID:FXyz,项目名称:FXyzLib,代码行数:9,代码来源:TriangleMeshHelper.java

示例5: getMaterialWithPalette

import javafx.scene.paint.PhongMaterial; //导入方法依赖的package包/类
public Material getMaterialWithPalette(){
    PhongMaterial mat = new PhongMaterial();
    mat.setDiffuseMap(getPaletteImage());
    mat.setSpecularPower(20);
    mat.setDiffuseColor(Color.WHITE);
    mat.setSpecularColor(Color.WHITE);
    return mat;
}
 
开发者ID:FXyz,项目名称:FXyzLib,代码行数:9,代码来源:TriangleMeshHelper.java

示例6: setMaterial

import javafx.scene.paint.PhongMaterial; //导入方法依赖的package包/类
private void setMaterial(PhongMaterial material, Color color) {
	// material.setDiffuseColor(web("#cccccc"));
	material.setDiffuseColor(color);
	material.setSpecularColor(color);

	// Color.rgb((int) color.getRed(), (int) color.getGreen(), (int) color.getBlue(), 128 / 256d));
	material.setSpecularPower(80);
}
 
开发者ID:lyrachord,项目名称:FX3DAndroid,代码行数:9,代码来源:ScadaApplication.java


注:本文中的javafx.scene.paint.PhongMaterial.setSpecularPower方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。