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


Java SceneComposerToolController类代码示例

本文整理汇总了Java中com.jme3.gde.scenecomposer.SceneComposerToolController的典型用法代码示例。如果您正苦于以下问题:Java SceneComposerToolController类的具体用法?Java SceneComposerToolController怎么用?Java SceneComposerToolController使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: activate

import com.jme3.gde.scenecomposer.SceneComposerToolController; //导入依赖的package包/类
@Override
public void activate(AssetManager manager, Node toolNode, Node onTopToolNode, Spatial selectedSpatial, SceneComposerToolController toolController) {
    super.activate(manager, toolNode, onTopToolNode, selectedSpatial, toolController);
    pickManager = Lookup.getDefault().lookup(PickManager.class);
    displayPlanes();
    displayCones();
}
 
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:8,代码来源:MoveTool.java

示例2: activate

import com.jme3.gde.scenecomposer.SceneComposerToolController; //导入依赖的package包/类
@Override
public void activate(AssetManager manager, Node toolNode, Node onTopToolNode, Spatial selectedSpatial, SceneComposerToolController toolController) {
    super.activate(manager, toolNode, onTopToolNode, selectedSpatial, toolController); //To change body of generated methods, choose Tools | Templates.
    hideMarker();
    if (selectedSpatial != null) {
        duplicate();
        terminate();
        
        //then enable move shortcut
        toolController.doKeyPressed(new KeyInputEvent(KeyInput.KEY_G, 'g', true, false));
    } else {
        terminate();
    }
}
 
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:15,代码来源:DuplicateShortcut.java

示例3: activate

import com.jme3.gde.scenecomposer.SceneComposerToolController; //导入依赖的package包/类
@Override
public void activate(AssetManager manager, Node toolNode, Node onTopToolNode, Spatial selectedSpatial, SceneComposerToolController toolController) {
    super.activate(manager, toolNode, onTopToolNode, selectedSpatial, toolController); //To change body of generated methods, choose Tools | Templates.
    hideMarker();
    numberBuilder = new StringBuilder();
    if (selectedSpatial == null) {
        terminate();
    } else {
        init(selectedSpatial);
    }
}
 
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:12,代码来源:RotateShortcut.java

示例4: mouseMoved

import com.jme3.gde.scenecomposer.SceneComposerToolController; //导入依赖的package包/类
@Override
public void mouseMoved(Vector2f screenCoord, JmeNode rootNode, DataObject dataObject) {

    if (!pickEnabled) {
        if (currentAxis.equals(Vector3f.UNIT_XYZ)) {
            pickManager.initiatePick(toolController.getSelectedSpatial(), camera.getRotation(), SceneComposerToolController.TransformationType.camera, camera, screenCoord);
            pickEnabled = true;
        } else if (currentAxis.equals(Vector3f.UNIT_X)) {
            pickManager.initiatePick(toolController.getSelectedSpatial(), PickManager.PLANE_YZ, getTransformType(), camera, screenCoord);
            pickEnabled = true;
        } else if (currentAxis.equals(Vector3f.UNIT_Y)) {
            pickManager.initiatePick(toolController.getSelectedSpatial(), PickManager.PLANE_XZ, getTransformType(), camera, screenCoord);
            pickEnabled = true;
        } else if (currentAxis.equals(Vector3f.UNIT_Z)) {
            pickManager.initiatePick(toolController.getSelectedSpatial(), PickManager.PLANE_XY, getTransformType(), camera, screenCoord);
            pickEnabled = true;
        } else {
            return;
        }
    }

    if (pickManager.updatePick(camera, screenCoord)) {

        Quaternion rotation = startRotation.mult(pickManager.getRotation(startWorldRotate.inverse()));
        toolController.getSelectedSpatial().setLocalRotation(rotation);
        finalRotation = rotation;
        updateToolsTransformation();
    }
}
 
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:30,代码来源:RotateShortcut.java

示例5: activate

import com.jme3.gde.scenecomposer.SceneComposerToolController; //导入依赖的package包/类
@Override
public void activate(AssetManager manager, Node toolNode, Node onTopToolNode, Spatial selectedSpatial, SceneComposerToolController toolController) {
    super.activate(manager, toolNode, onTopToolNode, selectedSpatial, toolController); //To change body of generated methods, choose Tools | Templates.
    hideMarker();
    if (selectedSpatial != null) {
        delete();
    }
    terminate();
}
 
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:10,代码来源:DeleteShortcut.java

示例6: activate

import com.jme3.gde.scenecomposer.SceneComposerToolController; //导入依赖的package包/类
@Override
public void activate(AssetManager manager, Node toolNode, Node onTopToolNode, Spatial selectedSpatial, SceneComposerToolController toolController) {
    super.activate(manager, toolNode, onTopToolNode, selectedSpatial, toolController);
    pickManager = Lookup.getDefault().lookup(PickManager.class);
    displayPlanes();
    displayBoxes();
}
 
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:8,代码来源:ScaleTool.java

示例7: actionPrimary

import com.jme3.gde.scenecomposer.SceneComposerToolController; //导入依赖的package包/类
@Override
public void actionPrimary(Vector2f screenCoord, boolean pressed, JmeNode rootNode, DataObject dataObject) {
    if (!pressed) {
        setDefaultAxisMarkerColors();
        pickedMarker = null; // mouse released, reset selection
        constraintAxis = Vector3f.UNIT_XYZ; // no axis constraint
        if (wasDragging) {
            actionPerformed(new ScaleUndo(toolController.getSelectedSpatial(), startScale, lastScale));
            wasDragging = false;
        }
        pickManager.reset();
    } else {
        if (toolController.getSelectedSpatial() == null) {
            return;
        }
        if (pickedMarker == null) {
            pickedMarker = pickAxisMarker(camera, screenCoord, axisPickType);
            if (pickedMarker == null) {
                return;
            }

            if (pickedMarker.equals(QUAD_XY) || pickedMarker.equals(QUAD_XZ) || pickedMarker.equals(QUAD_YZ)) {
                pickManager.initiatePick(toolController.getSelectedSpatial(), camera.getRotation(),
                        SceneComposerToolController.TransformationType.camera, camera, screenCoord);
            } else if (pickedMarker.equals(ARROW_X)) {
                pickManager.initiatePick(toolController.getSelectedSpatial(), PickManager.PLANE_XY, getTransformType(), camera, screenCoord);
                constraintAxis = Vector3f.UNIT_X; // scale only X
            } else if (pickedMarker.equals(ARROW_Y)) {
                pickManager.initiatePick(toolController.getSelectedSpatial(), PickManager.PLANE_YZ, getTransformType(), camera, screenCoord);
                constraintAxis = Vector3f.UNIT_Y; // scale only Y
            } else if (pickedMarker.equals(ARROW_Z)) {
                pickManager.initiatePick(toolController.getSelectedSpatial(), PickManager.PLANE_XZ, getTransformType(), camera, screenCoord);
                constraintAxis = Vector3f.UNIT_Z; // scale only Z
            }
            startScale = toolController.getSelectedSpatial().getLocalScale().clone();
            wasDragging = true;
        }
    }
}
 
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:40,代码来源:ScaleTool.java

示例8: initiatePick

import com.jme3.gde.scenecomposer.SceneComposerToolController; //导入依赖的package包/类
public void initiatePick(Spatial selectedSpatial, Quaternion planeRotation, SceneComposerToolController.TransformationType type, Camera camera, Vector2f screenCoord) {
    spatial = selectedSpatial;
    startSpatialLocation = selectedSpatial.getWorldTranslation().clone();

    setTransformation(planeRotation, type, camera);
    plane.setLocalTranslation(startSpatialLocation);

    startPickLoc = SceneEditTool.pickWorldLocation(camera, screenCoord, plane, null);
}
 
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:10,代码来源:PickManager.java

示例9: mouseMoved

import com.jme3.gde.scenecomposer.SceneComposerToolController; //导入依赖的package包/类
@Override
public void mouseMoved(Vector2f screenCoord, JmeNode rootNode, DataObject dataObject) {

    if (!pickEnabled) {
        if (currentAxis.equals(Vector3f.UNIT_XYZ)) {
            pickManager.initiatePick(toolController.getSelectedSpatial(), camera.getRotation(), SceneComposerToolController.TransformationType.camera, camera, screenCoord);
            pickEnabled = true;
        } else if (currentAxis.equals(Vector3f.UNIT_X)) {
            pickManager.initiatePick(toolController.getSelectedSpatial(), PickManager.PLANE_XY, getTransformType(), camera, screenCoord);
            pickEnabled = true;
        } else if (currentAxis.equals(Vector3f.UNIT_Y)) {
            pickManager.initiatePick(toolController.getSelectedSpatial(), PickManager.PLANE_YZ, getTransformType(), camera, screenCoord);
            pickEnabled = true;
        } else if (currentAxis.equals(Vector3f.UNIT_Z)) {
            pickManager.initiatePick(toolController.getSelectedSpatial(), PickManager.PLANE_XZ, getTransformType(), camera, screenCoord);
            pickEnabled = true;
        } else {
            return;
        }
    }

    if (pickManager.updatePick(camera, screenCoord)) {
        //pick update success
        Vector3f diff;

        if (currentAxis.equals(Vector3f.UNIT_XYZ)) {
            diff = pickManager.getTranslation();
        } else {
            diff = pickManager.getTranslation(currentAxis);
        }
        Vector3f position;
        Spatial parent = toolController.getSelectedSpatial().getParent();
        if (parent != null) {
            position = startPosition.add(parent.getWorldRotation().inverse().mult(diff));
        } else {
            position = startPosition.add(diff);
        }
        finalPosition = position;
        toolController.getSelectedSpatial().setLocalTranslation(position);
        updateToolsTransformation();
    }
}
 
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:43,代码来源:MoveShortcut.java

示例10: activate

import com.jme3.gde.scenecomposer.SceneComposerToolController; //导入依赖的package包/类
@Override
public void activate(AssetManager manager, Node toolNode, Node onTopToolNode, Spatial selectedSpatial, SceneComposerToolController toolController) {
    super.activate(manager, toolNode, onTopToolNode, selectedSpatial, toolController);
    pickManager = Lookup.getDefault().lookup(PickManager.class);
    displayCircles();
}
 
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:7,代码来源:RotateTool.java

示例11: activate

import com.jme3.gde.scenecomposer.SceneComposerToolController; //导入依赖的package包/类
@Override
public void activate(AssetManager manager, Node toolNode, Node onTopToolNode, Spatial selectedSpatial, SceneComposerToolController toolController) {
    super.activate(manager, toolNode, onTopToolNode, selectedSpatial, toolController);
    moveManager = Lookup.getDefault().lookup(MoveManager.class);
    displayPlanes();
}
 
开发者ID:maany,项目名称:jME-CinematicEditor,代码行数:7,代码来源:MoveTool.java

示例12: activate

import com.jme3.gde.scenecomposer.SceneComposerToolController; //导入依赖的package包/类
@Override
public void activate(AssetManager manager, Node toolNode, Node onTopToolNode, Spatial selectedSpatial, SceneComposerToolController toolController) {
    super.activate(manager, toolNode, onTopToolNode, selectedSpatial, toolController);
    displayPlanes();
}
 
开发者ID:maany,项目名称:jME-CinematicEditor,代码行数:6,代码来源:RotateTool.java


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