use of com.jme3.input.controls.KeyTrigger in project jmonkeyengine by jMonkeyEngine.
the class TerrainTestAndroid method setupKeys.
private void setupKeys() {
flyCam.setMoveSpeed(50);
inputManager.addMapping("wireframe", new KeyTrigger(KeyInput.KEY_T));
inputManager.addListener(actionListener, "wireframe");
inputManager.addMapping("triPlanar", new KeyTrigger(KeyInput.KEY_P));
inputManager.addListener(actionListener, "triPlanar");
}
use of com.jme3.input.controls.KeyTrigger in project jmonkeyengine by jMonkeyEngine.
the class VRApplication method initialize.
@Override
public void initialize() {
logger.config("Initialize VR application...");
initialize_internal();
cam.setFrustumFar(fFar);
cam.setFrustumNear(fNear);
dummyCam = cam.clone();
if (isInVR()) {
logger.config("VR mode enabled.");
if (VRhardware != null) {
VRhardware.initVRCompositor(compositorAllowed());
} else {
logger.warning("No VR system found.");
}
//FIXME: WARNING !!
viewmanager = new VRViewManagerOpenVR(null);
viewmanager.setResolutionMultiplier(resMult);
inputManager.addMapping(RESET_HMD, new KeyTrigger(KeyInput.KEY_F9));
setLostFocusBehavior(LostFocusBehavior.Disabled);
} else {
logger.config("VR mode disabled.");
viewPort.attachScene(rootNode);
guiViewPort.attachScene(guiNode);
}
if (viewmanager != null) {
viewmanager.initialize();
}
simpleInitApp();
// any filters created, move them now
if (viewmanager != null) {
viewmanager.moveScreenProcessingToEyes();
// print out camera information
if (isInVR()) {
logger.info("VR Initialization Information");
if (viewmanager.getLeftCamera() != null) {
logger.info("camLeft: " + viewmanager.getLeftCamera().toString());
}
if (viewmanager.getRightCamera() != null) {
logger.info("camRight: " + viewmanager.getRightCamera().toString());
}
}
}
}
Aggregations