當前位置: 首頁>>代碼示例>>Java>>正文


Java SceneEditTool類代碼示例

本文整理匯總了Java中com.jme3.gde.scenecomposer.SceneEditTool的典型用法代碼示例。如果您正苦於以下問題:Java SceneEditTool類的具體用法?Java SceneEditTool怎麽用?Java SceneEditTool使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SceneEditTool類屬於com.jme3.gde.scenecomposer包,在下文中一共展示了SceneEditTool類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initiatePick

import com.jme3.gde.scenecomposer.SceneEditTool; //導入依賴的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

示例2: move

import com.jme3.gde.scenecomposer.SceneEditTool; //導入依賴的package包/類
public boolean move(Camera camera, Vector2f screenCoord, Vector3f constraintAxis, boolean gridSnap) {
    Node toPick = alternativePickTarget == null ? plane : alternativePickTarget;

    Vector3f planeHit = SceneEditTool.pickWorldLocation(camera, screenCoord, toPick, alternativePickTarget == null ? null : spatial);
    if (planeHit == null) {
        return false;
    }

    Spatial parent = spatial.getParent();
    //we are moving the root node, there is a slight chance that something went wrong.
    if (parent == null) {
        return false;
    }

    //offset in world space
    if (offset == null) {
        offset = planeHit.subtract(spatial.getWorldTranslation()); // get the offset when we start so it doesn't jump
    }

    newPos.set(planeHit).subtractLocal(offset);

    //constraining the translation with the contraintAxis.
    Vector3f tmp = startWorldLoc.mult(Vector3f.UNIT_XYZ.subtract(constraintAxis));
    newPos.multLocal(constraintAxis).addLocal(tmp);
    worldToLocalMove(gridSnap);
    return true;
}
 
開發者ID:maany,項目名稱:jME-CinematicEditor,代碼行數:28,代碼來源:MoveManager.java

示例3: MoveTool

import com.jme3.gde.scenecomposer.SceneEditTool; //導入依賴的package包/類
public MoveTool() {
    axisPickType = SceneEditTool.AxisMarkerPickType.axisAndPlane;
    setOverrideCameraControl(true);

}
 
開發者ID:jMonkeyEngine,項目名稱:sdk,代碼行數:6,代碼來源:MoveTool.java

示例4: RotateTool

import com.jme3.gde.scenecomposer.SceneEditTool; //導入依賴的package包/類
public RotateTool() {
    axisPickType = SceneEditTool.AxisMarkerPickType.planeOnly;
    setOverrideCameraControl(true);
}
 
開發者ID:jMonkeyEngine,項目名稱:sdk,代碼行數:5,代碼來源:RotateTool.java

示例5: updatePick

import com.jme3.gde.scenecomposer.SceneEditTool; //導入依賴的package包/類
/**
 *
 * @param camera
 * @param screenCoord
 * @return true if the the new picked location is set, else return false.
 */
public boolean updatePick(Camera camera, Vector2f screenCoord) {
    finalPickLoc = SceneEditTool.pickWorldLocation(camera, screenCoord, plane, null);
    return finalPickLoc != null;
}
 
開發者ID:jMonkeyEngine,項目名稱:sdk,代碼行數:11,代碼來源:PickManager.java


注:本文中的com.jme3.gde.scenecomposer.SceneEditTool類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。