本文整理汇总了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;
}
示例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);
}
示例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);
}