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


Java FlyByCamera类代码示例

本文整理汇总了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();
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:30,代码来源:SimpleApplication.java

示例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");

}
 
开发者ID:GIScience,项目名称:helios,代码行数:29,代码来源:CameraAppState.java

示例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();
}
 
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:32,代码来源:SimpleApplication.java

示例4: getFlyByCamera

import com.jme3.input.FlyByCamera; //导入依赖的package包/类
@Override
public FlyByCamera getFlyByCamera() {
    defaultFakeError();
    return null;
}
 
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:6,代码来源:FakeApplication.java

示例5: setFlyByCamera

import com.jme3.input.FlyByCamera; //导入依赖的package包/类
public void setFlyByCamera(FlyByCamera flyCam) {
    this.flyCam = flyCam;
}
 
开发者ID:samynk,项目名称:DArtE,代码行数:4,代码来源:SandboxViewport.java

示例6: getFlyByCamera

import com.jme3.input.FlyByCamera; //导入依赖的package包/类
/**
 * Retrieves flyCam
 * @return flyCam Camera object
 *
 */
public FlyByCamera getFlyByCamera() {
    return flyCam;
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:9,代码来源:SimpleApplication.java

示例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);
 
开发者ID:QuietOne,项目名称:MonkeyBrains,代码行数:6,代码来源:GameControl.java


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