本文整理汇总了Java中com.jme3.input.FlyByCamera类的典型用法代码示例。如果您正苦于以下问题:Java FlyByCamera类的具体用法?Java FlyByCamera怎么用?Java FlyByCamera使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FlyByCamera类属于com.jme3.input包,在下文中一共展示了FlyByCamera类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initialize
import com.jme3.input.FlyByCamera; //导入依赖的package包/类
@Override
public void initialize() {
super.initialize();
guiNode.setQueueBucket(Bucket.Gui);
guiNode.setCullHint(CullHint.Never);
loadFPSText();
loadStatsView();
viewPort.attachScene(rootNode);
guiViewPort.attachScene(guiNode);
if (inputManager != null) {
flyCam = new FlyByCamera(cam);
flyCam.setMoveSpeed(1f);
flyCam.registerWithInput(inputManager);
if (context.getType() == Type.Display) {
inputManager.addMapping(INPUT_MAPPING_EXIT, new KeyTrigger(KeyInput.KEY_ESCAPE));
}
inputManager.addMapping(INPUT_MAPPING_CAMERA_POS, new KeyTrigger(KeyInput.KEY_C));
inputManager.addMapping(INPUT_MAPPING_MEMORY, new KeyTrigger(KeyInput.KEY_M));
inputManager.addListener(actionListener, INPUT_MAPPING_EXIT,
INPUT_MAPPING_CAMERA_POS, INPUT_MAPPING_MEMORY);
}
// call user code
simpleInitApp();
}
示例2: initialize
import com.jme3.input.FlyByCamera; //导入依赖的package包/类
@Override
public void initialize(AppStateManager stateManager, Application app) {
super.initialize(stateManager, app);
FlyByCamera flyCam = this.mApp.getFlyByCamera();
flyCam.setEnabled(false);
flyCam.setDragToRotate(true);
flyCam.setMoveSpeed(0);
Vector3D bs = sim.getScanner().platform.scene.getAABB().getSize();
maxCamSpeed = Math.max(Math.max(bs.getX(), bs.getY()), bs.getZ()) * 0.4;
if (maxCamSpeed < 2) {
maxCamSpeed = 2;
}
inputManager.addMapping("Camera", new KeyTrigger(KeyInput.KEY_V));
inputManager.addMapping("W", new KeyTrigger(KeyInput.KEY_W));
inputManager.addMapping("A", new KeyTrigger(KeyInput.KEY_A));
inputManager.addMapping("S", new KeyTrigger(KeyInput.KEY_S));
inputManager.addMapping("D", new KeyTrigger(KeyInput.KEY_D));
inputManager.addMapping("E", new KeyTrigger(KeyInput.KEY_E));
// Add the names to the action listener.
inputManager.addListener(actionListener, "Camera", "W", "A", "S", "D", "E");
}
示例3: initialize
import com.jme3.input.FlyByCamera; //导入依赖的package包/类
@Override
public void initialize() {
super.initialize();
guiNode.setQueueBucket(Bucket.Gui);
guiNode.setCullHint(CullHint.Never);
loadFPSText();
loadStatsView();
viewPort.attachScene(rootNode);
guiViewPort.attachScene(guiNode);
if (inputManager != null) {
flyCam = new FlyByCamera(cam);
flyCam.setMoveSpeed(1f);
flyCam.registerWithInput(inputManager);
if (context.getType() == Type.Display) {
inputManager.addMapping(INPUT_MAPPING_EXIT, new KeyTrigger(KeyInput.KEY_ESCAPE));
}
inputManager.addMapping(INPUT_MAPPING_CAMERA_POS, new KeyTrigger(KeyInput.KEY_C));
inputManager.addMapping(INPUT_MAPPING_MEMORY, new KeyTrigger(KeyInput.KEY_M));
inputManager.addMapping(INPUT_MAPPING_HIDE_STATS, new KeyTrigger(KeyInput.KEY_F5));
inputManager.addListener(actionListener, INPUT_MAPPING_EXIT,
INPUT_MAPPING_CAMERA_POS, INPUT_MAPPING_MEMORY, INPUT_MAPPING_HIDE_STATS);
}
// call user code
simpleInitApp();
}
示例4: getFlyByCamera
import com.jme3.input.FlyByCamera; //导入依赖的package包/类
@Override
public FlyByCamera getFlyByCamera() {
defaultFakeError();
return null;
}
示例5: setFlyByCamera
import com.jme3.input.FlyByCamera; //导入依赖的package包/类
public void setFlyByCamera(FlyByCamera flyCam) {
this.flyCam = flyCam;
}
示例6: getFlyByCamera
import com.jme3.input.FlyByCamera; //导入依赖的package包/类
/**
* Retrieves flyCam
* @return flyCam Camera object
*
*/
public FlyByCamera getFlyByCamera() {
return flyCam;
}
示例7: setFlyCameraSettings
import com.jme3.input.FlyByCamera; //导入依赖的package包/类
/**
* Add all fly camera settings that will be used in game.
* @param flyCam
*/
public void setFlyCameraSettings(FlyByCamera flyCam);