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


Java RenderState.setWireframe方法代码示例

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


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

示例1: createCollisionPlane

import com.jme3.material.RenderState; //导入方法依赖的package包/类
/**
 * Create collision plane.
 */
@FromAnyThread
private void createCollisionPlane() {

    final AssetManager assetManager = EDITOR.getAssetManager();

    final Material material = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    final RenderState renderState = material.getAdditionalRenderState();
    renderState.setFaceCullMode(RenderState.FaceCullMode.Off);
    renderState.setWireframe(true);

    final float size = 20000;

    final Geometry geometry = new Geometry("plane", new Quad(size, size));
    geometry.setMaterial(material);
    geometry.setLocalTranslation(-size / 2, -size / 2, 0);

    collisionPlane = new Node();
    collisionPlane.attachChild(geometry);
}
 
开发者ID:JavaSaBr,项目名称:jmonkeybuilder,代码行数:23,代码来源:AbstractSceneEditor3DState.java

示例2: getDebugMaterial

import com.jme3.material.RenderState; //导入方法依赖的package包/类
protected static Material getDebugMaterial(Geometry geometry, boolean colors, boolean wire, boolean normals, boolean faceCullOff) {
//        RenderState renderState = geometry.getMaterial().getAdditionalRenderState();

        Material debugMaterial;
        Material originalMaterial = geometry.getMaterial();
        if(normals) {
            debugMaterial = DebugUtil.createNormalMaterial(geometry);
        }  else if(colors || !wire || originalMaterial == null) {
            debugMaterial = DebugUtil.createDebugMaterial(geometry, colors);
        } else {
            debugMaterial = geometry.getMaterial().clone();
            wire = true;
        }

        RenderState debugRenderState = debugMaterial.getAdditionalRenderState();

        if(wire) {
            debugRenderState.setWireframe(originalMaterial == null || !originalMaterial.getAdditionalRenderState().isWireframe());
        }

        if(faceCullOff) {
            debugRenderState.setFaceCullMode(RenderState.FaceCullMode.Off);
        }

        return debugMaterial;
    }
 
开发者ID:NemesisMate,项目名称:UtilJME3-Debug,代码行数:27,代码来源:DebugMeshState.java

示例3: toggleWireframeMode

import com.jme3.material.RenderState; //导入方法依赖的package包/类
private void toggleWireframeMode(String name, boolean isPressed, float tpf) {
	if (!isPressed) {
		for (Block block : cosmos.getBlocks()) {
			if (!Block.isNullBlock(block)) {
				Material material = resourceManager.getMaterial(block);
				
				if (material != null) {
					RenderState renderState = material.getAdditionalRenderState();
					renderState.setWireframe(!renderState.isWireframe());
				}
			}
		}
	}
}
 
开发者ID:quadracoatl,项目名称:quadracoatl,代码行数:15,代码来源:GameInputState.java

示例4: createDebugMaterial

import com.jme3.material.RenderState; //导入方法依赖的package包/类
private @NotNull Material createDebugMaterial(@NotNull final AssetManager assetManager, @NotNull final ColorRGBA blue) {

        final Material material = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        material.setColor("Color", blue);

        final RenderState additionalRenderState = material.getAdditionalRenderState();
        additionalRenderState.setWireframe(true);

        return material;
    }
 
开发者ID:JavaSaBr,项目名称:jmonkeybuilder-extension,代码行数:11,代码来源:BulletDebugAppState.java


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