Examples of CameraNode


Examples of com.jme.scene.CameraNode

        return cameraComponent;
    }

    private Node createCameraGraph(WorldManager wm) {
        Node cameraSG = new Node("MyCamera SG");
        cameraNode = new CameraNode("MyCamera", null);
        cameraSG.attachChild(cameraNode);

        cameraNode.addGeometricUpdateListener(new GeometricUpdateListener() {

            public void geometricDataChanged(Spatial arg0) {
View Full Code Here

Examples of com.jme.scene.CameraNode

        virtualHandler = new VirtualHandler(cam, hud.getControlCrossNode(), hud.getSpeedBarNode());

        input = new ShipInputHandler(virtualHandler);
        am.registerWithInputHandler(input);

        node = new CameraNode("cocpit", testCamera);
        SceneMonitor.getMonitor().registerNode(node, "COCKIP");

        node.setRenderQueueMode(Renderer.QUEUE_TRANSPARENT);
        ZBufferState zs = DisplaySystem.getDisplaySystem().getRenderer().createZBufferState();
        node.setRenderState(zs);
View Full Code Here

Examples of com.jme3.scene.CameraNode

        cinematic.addCinematicEvent(12f, seagullCamMotion2);

    }

    private void createCamMotionPath() {
        CameraNode seagull = cinematic.bindCamera("seagull", myApp.getCamera());
        seagull.setLocalTranslation(new Vector3f(-231.00694f, 269.15887f, 319.6499f));
        seagull.lookAt(new Vector3f(0f, 0f, 0f), Vector3f.UNIT_Y);
        //Motion1
        MotionPath path1 = new MotionPath();
        path1.addWayPoint(new Vector3f(-231.00694f, 269.15887f, 319.6499f));
        path1.addWayPoint(new Vector3f(-271.03436f, 274.78607f, 166.41858f));
        path1.addWayPoint(new Vector3f(-282.98575f, 198.66827f, -62.538017f));
View Full Code Here

Examples of com.jme3.scene.CameraNode

       
        for (int i = 0; i < chars; i++) {
          if(clientInfo.getCharHandler().getSelectedChar().isLastUsed()){
            clientInfo.getCharHandler().setSelected(i);
            camera.lookAt(scene.getChild("pos"+(i+1)).getLocalTranslation(), Vector3f.UNIT_Y);
            CameraNode cn;
           
          }
          NewCharacterModel v = new NewCharacterModel(clientInfo.getCharHandler().getCharSummary(i));
          v.attachVisuals();
          pos = scene.getChild("pos"+(i+1)).getLocalTranslation().clone();
View Full Code Here

Examples of com.jme3.scene.CameraNode

     */
    public CameraNode bindCamera(String cameraName, Camera cam) {
        if (cameras.containsKey(cameraName)) {
            throw new IllegalArgumentException("Camera " + cameraName + " is already binded to this cinematic");
        }
        CameraNode node = new CameraNode(cameraName, cam);
        node.setControlDir(ControlDirection.SpatialToCamera);
        node.getControl(CameraControl.class).setEnabled(false);
        cameras.put(cameraName, node);
        scene.attachChild(node);
        return node;
    }
View Full Code Here

Examples of com.jme3.scene.CameraNode

        } else {
            // This probably is not correct.
            fovY = ((Number) structure.getFieldValue("ortho_scale")).floatValue();
        }
        camera.setFrustumPerspective(fovY, aspect, clipsta, clipend);
        return new CameraNode(null, camera);
    }
View Full Code Here

Examples of com.jme3.scene.CameraNode

            aspect = ((Number) structure.getFieldValue("lens")).floatValue();
        } else {
            aspect = ((Number) structure.getFieldValue("ortho_scale")).floatValue();
        }
        camera.setFrustumPerspective(aspect, camera.getWidth() / camera.getHeight(), clipsta, clipend);
        return new CameraNode(null, camera);
    }
View Full Code Here

Examples of com.jme3.scene.CameraNode

            // XXX: Most likely, it is in radians..
            fov = fov * FastMath.RAD_TO_DEG;
        }
        camera.setFrustumPerspective(fov, (float)DEFAULT_CAM_WIDTH / DEFAULT_CAM_HEIGHT, 1, 1000);
       
        cameraNode = new CameraNode(attribs.getValue("name"), camera);
        cameraNode.setControlDir(ControlDirection.SpatialToCamera);
       
        node.attachChild(cameraNode);
        node = null;
    }
View Full Code Here

Examples of com.jme3.scene.CameraNode

    }

  @Override
  public void internalLoadSceneObject()
    {
    sceneObject = new CameraNode(cameraType.toString(), camera);
    sceneObject.setControlDir(ControlDirection.SpatialToCamera);

    if (cameraType.equals(CameraType.FirstPerson))
      sceneObject.setCullHint(CullHint.Always);
    else if (cameraType.equals(CameraType.ThirdPerson)) sceneObject.setCullHint(CullHint.Always);
View Full Code Here

Examples of com.jme3.scene.CameraNode

        Camera cam = defaultCamera.clone();
        cam.setViewPort(0f, 0.5f, 0.5f, 1.0f);
        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);
        head.attachChild(actuator);
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.