Package com.jme3.scene

Examples of com.jme3.scene.CameraNode.rotate()


        cam.setFrustumFar(500);
        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);
View Full Code Here


    b.setMode(Mesh.Mode.Points);
    b.setPointSize(10f);
    b.setStatic();
    */
    Geometry g = new Geometry("Bubble", b);
    g.rotate(FastMath.HALF_PI, 0, FastMath.HALF_PI);
    //g.scale(1, 1, -1);
    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    Texture tex = assetManager.loadTexture("Textures/test3.png");
    mat.setTexture("ColorMap", tex);
    //mat.setColor("Color", ColorRGBA.Blue);
View Full Code Here

        Geometry geom = new Geometry("Box", q);
        Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        mat.setTexture("ColorMap", assetManager.loadTexture("com/l2client/test/material/chterraingrass01_n.dds"));
        geom.setMaterial(mat);
//        geom.setLocalTranslation((-0.5f*size)+x,(-0.5f*size)+y,z); 
        geom.rotate(-FastMath.HALF_PI, 0, 0);
        geom.setLocalTranslation((-0.5f*size)+x,y,(0.5f*size)+z);
       
        return geom;
    }
   
View Full Code Here

        Geometry geom = new Geometry("Box", q);
        Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        mat.setTexture("ColorMap", assetManager.loadTexture("com/l2client/test/material/chterraingrass01_n.dds"));
        geom.setMaterial(mat);
//        geom.setLocalTranslation((-0.5f*size)+x,(-0.5f*size)+y,z); 
        geom.rotate(-FastMath.HALF_PI, 0, 0);
        geom.setLocalTranslation((-0.5f*size)+x,y,(0.5f*size)+z);
       
        return geom;
    }
   
View Full Code Here

    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)));
    face2.move(0, 0, -(patchWidth * selectedSizeVariation) / 2);
    grassPatch.attachChild(face2);

    grassPatch.setCullHint(Spatial.CullHint.Dynamic);
View Full Code Here

    mat_lit.setColor("Specular", ColorRGBA.White);
    mat_lit.setColor("Diffuse", ColorRGBA.White);
    mat_lit.setFloat("Shininess", 5f); // [1,128]
    shiny_rock.setMaterial(mat_lit);
    shiny_rock.setLocalTranslation(0, 2, -2); // Move it a bit
    shiny_rock.rotate(1.6f, 0, 0); // Rotate it a bit
    rootNode.attachChild(shiny_rock);

    /** Must add a light to make the lit object visible! */
    DirectionalLight sun = new DirectionalLight();
    sun.setDirection(new Vector3f(1, 0, -2).normalizeLocal());
View Full Code Here

        basePlate.setMaterial(rawAluminumTexture);
        head.attachChild(basePlate);

        Geometry cameraBody = new Geometry("camera_body", new Cylinder(12, 12, 8, 15, true));
        cameraBody.setMaterial(blackAluminumTexture);
        cameraBody.rotate((float) Math.PI / 2, 0f, 0f);
        cameraBody.move(-6, -50 / 2 + 15 / 2, 8 + 3);
        head.attachChild(cameraBody);
       
        Camera cam = defaultCamera.clone();
        cam.setViewPort(0f, 0.5f, 0.5f, 1.0f);
View Full Code Here

    private Node createActuatorAssmNode(String name) {
        Node actuator = new Node(name);

        Geometry actuatorBody = new Geometry("body", new Cylinder(12, 12, 4, 25, true));
        actuatorBody.setMaterial(brushedAluminumTexture);
        actuatorBody.rotate((float) Math.PI / 2, 0f, 0f);
        actuator.attachChild(actuatorBody);

        Geometry actuatorPin = new Geometry("pin", new Cylinder(12, 12, 0.5f, 25, true));
        actuatorPin.rotate((float) Math.PI / 2, 0f, 0f);
        actuatorPin.setMaterial(polishedStainlessTexture);
View Full Code Here

        actuatorBody.setMaterial(brushedAluminumTexture);
        actuatorBody.rotate((float) Math.PI / 2, 0f, 0f);
        actuator.attachChild(actuatorBody);

        Geometry actuatorPin = new Geometry("pin", new Cylinder(12, 12, 0.5f, 25, true));
        actuatorPin.rotate((float) Math.PI / 2, 0f, 0f);
        actuatorPin.setMaterial(polishedStainlessTexture);
        actuator.attachChild(actuatorPin);

        return actuator;
    }
View Full Code Here

        body.setMaterial(blackAluminumTexture);
        nozzle.attachChild(body);
       
        Geometry tip = new Geometry("tip", new Cylinder(12, 12, 0.5f, 10, true));
        tip.setMaterial(polishedStainlessTexture);
        tip.rotate((float) Math.PI / 2, 0f, 0f);
        tip.move(0, -15, 0);
        nozzle.attachChild(tip);

        // move the nozzle assembly in front of the rail
        nozzle.move(0, 0, 2 + 15 / 2);
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.