Package com.jme3.math

Examples of com.jme3.math.Vector3f


      man = s.getPartManager();
      man.loadParts("megaset.csv");

        DirectionalLight dr = new DirectionalLight();
        dr.setColor(ColorRGBA.White);
        dr.setDirection(new Vector3f(1, 0 , 1));
       
        AmbientLight am = new AmbientLight();
        am.setColor(ColorRGBA.White);
        rootNode.addLight(am);
        rootNode.addLight(dr);
View Full Code Here


        pl.setColor(new ColorRGBA(0.88f, 0.92f, 0.95f, 1.0f));
        rootNode.addLight(pl);

        // sunset light
        DirectionalLight dl = new DirectionalLight();
        dl.setDirection(new Vector3f(-0.1f,-0.7f,1).normalizeLocal());
        dl.setColor(new ColorRGBA(0.44f, 0.30f, 0.20f, 1.0f));
        rootNode.addLight(dl);

        // skylight
        dl = new DirectionalLight();
        dl.setDirection(new Vector3f(-0.6f,-1,-0.6f).normalizeLocal());
        dl.setColor(new ColorRGBA(0.10f, 0.22f, 0.44f, 1.0f));
        rootNode.addLight(dl);

        // white ambient light
        dl = new DirectionalLight();
        dl.setDirection(new Vector3f(1, -0.5f,-0.1f).normalizeLocal());
        dl.setColor(new ColorRGBA(0.50f, 0.40f, 0.50f, 1.0f));
        rootNode.addLight(dl);
       
        rootNode.attachChild(GrassLayerUtil.createPatchField(bumpy, assetManager, "/vegetation/grass/grass/g3.tga",
            1.2f, 1.5f, 1f, 0.1f, 0f,0f,0.0f,0,1));
View Full Code Here

    @Override
    public void simpleUpdate(float tpf){
        angle += tpf * 0.25f;
        angle %= FastMath.TWO_PI;

        pl.setPosition(new Vector3f(FastMath.cos(angle) * 6f, 3f, FastMath.sin(angle) * 6f));
        lightMdl.setLocalTranslation(pl.getPosition());
    }
View Full Code Here

          terrain.setLocalTranslation(0, -100, 0);
          terrain.setLocalScale(2f, 0.5f, 2f);
          rootNode.attachChild(terrain);

          DirectionalLight light = new DirectionalLight();
          light.setDirection((new Vector3f(-0.5f, -1f, -0.5f)).normalize());
          rootNode.addLight(light);

          cam.setLocation(new Vector3f(0, 10, -10));
          cam.lookAtDirection(new Vector3f(0, -1.5f, -1).normalizeLocal(), Vector3f.UNIT_Y);
      }
View Full Code Here

        cam.setLocation(cam.getLocation().mult(0.5f));
        inputManager.setCursorVisible(true);
       
        DirectionalLight dr = new DirectionalLight();
        dr.setColor(ColorRGBA.White);
        dr.setDirection(new Vector3f(1, 0 , 1));
       
        AmbientLight am = new AmbientLight();
        am.setColor(ColorRGBA.White);
        rootNode.addLight(am);
        rootNode.addLight(dr);
View Full Code Here

  public static void main(String[] args) {
    TiledNavMesh m;
    try {
      DesktopAssetManager assetManager = new DesktopAssetManager(true);
      loadSave(assetManager, "grid.0_0.j3o", Vector3f.ZERO);
      loadSave(assetManager, "grid.0_1.j3o", new Vector3f(0,0,-128));
      loadSave(assetManager, "grid.1_0.j3o", new Vector3f(128,0,0));
      loadSave(assetManager, "grid.1_1.j3o", new Vector3f(128,0,-128));
      loadSave(assetManager, "grid_big.j3o", Vector3f.ZERO);
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }  }
View Full Code Here

      am = AreaTerrainManager.get();
      sm = Singleton.get().getSceneManager();
      rootNode.attachChild(debugNodes);

        DirectionalLight light = new DirectionalLight();
        light.setDirection((new Vector3f(-0.5f, -1f, -0.5f)).normalize());
        rootNode.addLight(light);

        AmbientLight ambLight = new AmbientLight();
        ambLight.setColor(new ColorRGBA(0.2f, 0.2f, 0.2f, 1f));
        rootNode.addLight(ambLight);
View Full Code Here

      em = Singleton.get().getNavManager();
      rootNode.attachChild(debugNodes);

        DirectionalLight light = new DirectionalLight();
        light.setDirection((new Vector3f(-0.5f, -1f, -0.5f)).normalize());
        rootNode.addLight(light);

        AmbientLight ambLight = new AmbientLight();
        ambLight.setColor(new ColorRGBA(0.2f, 0.2f, 0.2f, 1f));
        rootNode.addLight(ambLight);
View Full Code Here

      man.loadParts("megaset.csv");
      templates = man.getTemplates();

        DirectionalLight dr = new DirectionalLight();
        dr.setColor(ColorRGBA.White);
        dr.setDirection(new Vector3f(1, 0 , 1));
       
        AmbientLight am = new AmbientLight();
        am.setColor(ColorRGBA.White);
        rootNode.addLight(am);
        rootNode.addLight(dr);
View Full Code Here

     * Camera Position: (2.1353703, 0.10786462, 14.364603)
Camera Rotation: (0.0127822235, 0.98611915, 0.13812076, -0.091258995)
Camera Direction: (-0.1764535, 0.27474004, -0.94518876)
     */
   
    cam.setLocation(new Vector3f(2.1353703f, 0.10786462f, 14.364603f));
    cam.lookAtDirection(new Vector3f(-0.1764535f, 0.27474004f, -0.94518876f), Vector3f.UNIT_Y);
  }
View Full Code Here

TOP

Related Classes of com.jme3.math.Vector3f

Copyright © 2018 www.massapicom. 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.