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