Package com.jme3.scene

Examples of com.jme3.scene.Geometry.move()


        cam.update();
       
        CameraNode camNode = new CameraNode("camera", cam);
        camNode.setControlDir(CameraControl.ControlDirection.SpatialToCamera);
        camNode.rotate((float) Math.PI / 2, (float) Math.PI, 0);
        camNode.move(-6, -50 / 2 + 15 / 2, 8 + 3);
        head.attachChild(camNode);

        Node actuator = createActuatorAssmNode("actuator");
        actuator.move(8, -50 / 2 + 25 / 2, 4 + 3);
        head.attachChild(actuator);
View Full Code Here


    float selectedSizeVariation = (float) (rand * (patchScaleVariation - (1 / patchScaleVariation)))
        + (1 / patchScaleVariation);
    Quad faceShape = new Quad((patchWidth * selectedSizeVariation),
        patchHeight * selectedSizeVariation, false);
    Geometry face1 = new Geometry("face1", faceShape);
    face1.move(-(patchWidth * selectedSizeVariation) / 2, 0, 0);
    grassPatch.attachChild(face1);

    Geometry face2 = new Geometry("face2", faceShape);
    face2.rotate(new Quaternion().fromAngleAxis(-FastMath.PI / 2,
        new Vector3f(0, 1, 0)));
View Full Code Here

    grassPatch.attachChild(face1);

    Geometry face2 = new Geometry("face2", faceShape);
    face2.rotate(new Quaternion().fromAngleAxis(-FastMath.PI / 2,
        new Vector3f(0, 1, 0)));
    face2.move(0, 0, -(patchWidth * selectedSizeVariation) / 2);
    grassPatch.attachChild(face2);

    grassPatch.setCullHint(Spatial.CullHint.Dynamic);
    grassPatch.setQueueBucket(RenderQueue.Bucket.Transparent);

View Full Code Here

    private Geometry createObject(String key, int x, int y) {
        Material material = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        material.setColor("Color", ColorRGBA.Orange);

        Geometry geometry = new Geometry("x" + key, new Box(0.3f, 1, 0.3f));
        geometry.move(x, 1, y);
        geometry.setMaterial(material);
        return geometry;
    }
}
View Full Code Here

    Box box1 = new Box(Vector3f.ZERO, 1, 1, 1);
    Geometry blue = new Geometry("Box", box1);
    Material mat1 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    mat1.setColor("Color", ColorRGBA.Blue);
    blue.setMaterial(mat1);
    blue.move(1, -1, 1);

    /** create a red box straight above the blue one at (1,3,1) */
    Box box2 = new Box(Vector3f.ZERO, 1, 1, 1);
    Geometry red = new Geometry("Box", box2);
    Material mat2 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
View Full Code Here

    Box box2 = new Box(Vector3f.ZERO, 1, 1, 1);
    Geometry red = new Geometry("Box", box2);
    Material mat2 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    mat2.setColor("Color", ColorRGBA.Red);
    red.setMaterial(mat2);
    red.move(1, 3, 1);

    /** Create a pivot node at (0,0,0) and attach it to the root node */
    Node pivot = new Node("pivot");
    rootNode.attachChild(pivot); // put this node in the scene

View Full Code Here

        table.setMaterial(roughAluminumTexture);
        machine.attachChild(table);
       
        Geometry pcb = new Geometry("pcb", new Box(20, 1.57f / 2, 20));
        pcb.setMaterial(pcbTexture);
        pcb.move(-100, 12.7f / 2 + 1.57f / 2, 100);
        machine.attachChild(pcb);

        Geometry yRailLeft = new Geometry("y_rail_left", new Box(6, 6, 600 / 2));
        yRailLeft.setMaterial(polishedStainlessTexture);
        yRailLeft.move(-300 + 6, 12.7f, 0);
View Full Code Here

        pcb.move(-100, 12.7f / 2 + 1.57f / 2, 100);
        machine.attachChild(pcb);

        Geometry yRailLeft = new Geometry("y_rail_left", new Box(6, 6, 600 / 2));
        yRailLeft.setMaterial(polishedStainlessTexture);
        yRailLeft.move(-300 + 6, 12.7f, 0);
        machine.attachChild(yRailLeft);

        Geometry yRailRight = new Geometry("y_rail_right", new Box(6, 6, 600 / 2));
        yRailRight.setMaterial(polishedStainlessTexture);
        yRailRight.move(300 - 6, 12.7f, 0);
View Full Code Here

        yRailLeft.move(-300 + 6, 12.7f, 0);
        machine.attachChild(yRailLeft);

        Geometry yRailRight = new Geometry("y_rail_right", new Box(6, 6, 600 / 2));
        yRailRight.setMaterial(polishedStainlessTexture);
        yRailRight.move(300 - 6, 12.7f, 0);
        machine.attachChild(yRailRight);

        Node gantry = createGantryNode();
        gantry.move(0, 50 / 2 + 12.7f + 6, 0);
        machine.attachChild(gantry);;
View Full Code Here

        gantryTube.setMaterial(brushedAluminumTexture);
        gantry.attachChild(gantryTube);

        Geometry xRail = new Geometry("x_rail", new Box(600 / 2, 12 / 2, 12 / 2));
        xRail.setMaterial(polishedStainlessTexture);
        xRail.move(0, 0, 25 + 6);
        gantry.attachChild(xRail);

        Node head = createHeadNode();
        head.move(0, 10, 25 + 12 + 3);
        gantry.attachChild(head);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.