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


Java WireBox.setLineWidth方法代码示例

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


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

示例1: makeUnshadedWireBox

import com.jme3.scene.debug.WireBox; //导入方法依赖的package包/类
public Geometry makeUnshadedWireBox(String name, Vector3f extents, float lineWidth, ColorRGBA color) {
    Material mat = new Material(assetManager,
            "Common/MatDefs/Misc/Unshaded.j3md");
    mat.setColor("Color", color);
    mat.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);
    WireBox box = new WireBox(extents.x, extents.y, extents.z);
    box.setLineWidth(lineWidth);
    Geometry g = new Geometry(name, box);
    g.setMaterial(mat);

    g.setUserData("obj_shape", "wireBox");
    g.setUserData("obj_extents", extents);
    g.setUserData("obj_lineWidth", lineWidth);
    g.setUserData("obj_color", color);

    return g;
}
 
开发者ID:dwhuang,项目名称:SMILE,代码行数:18,代码来源:Factory.java

示例2: initMarker

import com.jme3.scene.debug.WireBox; //导入方法依赖的package包/类
protected void initMarker() {
    Material mat = baseApplication.getAssetManager().loadMaterial("Common/Materials/RedColor.j3m");
    WireBox box = new WireBox(Game.TILE_SIZE * 0.5f, 0.1f, Game.TILE_SIZE * 0.5f);
    box.setLineWidth(3);
    Geometry g = new Geometry(BLANK, box);
    g.setMaterial(mat);
    marker = g;
    rootNode.attachChild(marker);
}
 
开发者ID:jMonkeyEngine,项目名称:examplegame-skulls,代码行数:10,代码来源:EditScreen.java

示例3: load

import com.jme3.scene.debug.WireBox; //导入方法依赖的package包/类
@Override
protected void load() {
    /*
     * The load method is called very first when ever the user calls to go to this screen.
     * A black panel will by default be shown over the screen
     * One must normally load the level and player and inputs and camera stuff here.
     */
    game = new Game(baseApplication, rootNode);
    if (test) {
        game.test("skulls.properties");
    } else {
        game.play("level1.properties");
    }

    game.load();

    player = new Player(game);
    player.load();

    game.addGameListener(this);

    //Load the camera
    loadCameraSettings();

    //Load the inputs
    //Init the picker listener
    touchPickListener = new TouchPickListener(baseApplication.getCamera(), rootNode);
    touchPickListener.setPickListener(this);
    touchPickListener.registerWithInput(inputManager);

    //Hide dialogs
    scoreDialog.setScore(0);
    scoreDialog.setEnemyCount(0);
    scoreDialog.hide();

    //create a market geometry
    WireBox wb = new WireBox(Game.TILE_SIZE * 0.5f, 0.02f, Game.TILE_SIZE * 0.5f);
    wb.setLineWidth(2);
    marker = new Geometry("MARKER", wb);
    marker.setMaterial(baseApplication.getAssetManager().loadMaterial("Common/Materials/RedColor.j3m"));
    rootNode.attachChild(marker);

    cameraShaker = new CameraShaker(camera, rootNode);

}
 
开发者ID:jMonkeyEngine,项目名称:examplegame-skulls,代码行数:46,代码来源:PlayScreen.java


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