Examples of CameraNode


Examples of com.jme3.scene.CameraNode

  public ColorRGBA getGroundColor() {
    return groundColor;
  }

  public void worldInitialized() {
    CameraNode camNode = world.getPlayer().getCameraNode();
    Camera c = camNode.getCamera();
    float width = Math.abs(c.getFrustumRight() - c.getFrustumLeft());
    float height = Math.abs(c.getFrustumTop() - c.getFrustumBottom());
    float distance = c.getFrustumFar();
    float scale = distance / c.getFrustumNear();
    distance = distance * (255f / 256f);
    width *= scale;
    height *= scale;
    geom = new Geometry("SkyPlane", new Quad(width, height));
    geom.setLocalRotation(Quaternion.DIRECTION_Z.opposite());
    geom.setLocalTranslation(c.getDirection().mult(-distance).add(new Vector3f(-width / 2, height / 2, 0)));
    geom.setMaterial(mat);
    camNode.attachChild(geom);
  }
View Full Code Here

Examples of com.jme3.scene.CameraNode

    player.setUserObject(this);
    walkAngle = incarn.getStartAngle();

    hector.getHectorNode().addControl(player);

    camNode = new CameraNode("PlayerCam", cam);
    camNode.setControlDir(ControlDirection.SpatialToCamera);
    camNode.setLocalTranslation(Vector3f.ZERO);
    camNode.lookAt(Vector3f.UNIT_Z, Vector3f.UNIT_Y);
    hector.getHeadNode().attachChild(camNode);
View Full Code Here

Examples of com.jme3.scene.CameraNode

    chaseCam.setMinVerticalRotation(-FastMath.PI / 2);

    boolean pov = false;
    if (pov) {
      chaseCam.setEnabled(false);
      camNode = new CameraNode("Camera Node", cam);
      camNode.setControlDir(ControlDirection.SpatialToCamera);
      camNode.setLocalTranslation(new Vector3f(0, 0, 0));
      camNode.lookAt(new Vector3f(0, 0, 1), Vector3f.UNIT_Y);
      headNode.attachChild(camNode);
    }
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.