Package com.jme3.scene.shape

Examples of com.jme3.scene.shape.Quad


  public void initialize(AppStateManager stateManager, Application app) {
    super.initialize(stateManager, app);
    //cam = app.getCamera();
    assetManager = app.getAssetManager();
        guiFont = assetManager.loadFont("Interface/Fonts/Default.fnt");
        fpsText = new BitmapText(guiFont, false);
        fpsText.setLocalTranslation(0, fpsText.getLineHeight(), 0);
        fpsText.setText("Frames per second");
        //camText = new BitmapText(guiFont, false);
        //camText.setLocalTranslation(0, camText.getLineHeight()*5, 0);
        //camText.setText("Cam: ");
View Full Code Here


     * Attaches FPS statistics to guiNode and displays it on the screen.
     *
     */
    public void loadFPSText() {
        guiFont = assetManager.loadFont("Interface/Fonts/Default.fnt");
        fpsText = new BitmapText(guiFont, false);
        fpsText.setLocalTranslation(0, fpsText.getLineHeight(), 0);
        fpsText.setText("Frames per second");
        guiNode.attachChild(fpsText);
    }
View Full Code Here

    guiNode.detachChildNamed("Statistics View");

    camNode = new Node("Cam Node");

    flyCam.setEnabled(false);
    ChaseCamera chaseCam = new ChaseCamera(cam, camNode, inputManager);
    chaseCam.setSmoothMotion(true);
    chaseCam.setMaxDistance(100000);
    chaseCam.setMinVerticalRotation(-FastMath.PI / 2);

    rootNode.attachChild(camNode);

  }
View Full Code Here

        keyInput = context.getKeyInput();
        if (keyInput != null)
            keyInput.initialize();

        joyInput = null;
        inputManager = new InputManager(mouseInput, keyInput, joyInput);
       
        // init Input TUIO ----------------------------------
        //initTuio();

       
View Full Code Here

            //flyCam = new FlyByCamera(cam);
            //flyCam.setMoveSpeed(1f);
            //flyCam.registerWithInput(inputManager);

            if (context.getType() == Type.Display) {
                inputManager.addMapping("SIMPLEAPP_Exit", new KeyTrigger(KeyInput.KEY_ESCAPE));
            }
          
            inputManager.addMapping("SIMPLEAPP_CameraPos", new KeyTrigger(KeyInput.KEY_C));
            inputManager.addMapping("SIMPLEAPP_Memory", new KeyTrigger(KeyInput.KEY_M));
            inputManager.addListener(actionListener, "SIMPLEAPP_Exit",
                    "SIMPLEAPP_CameraPos", "SIMPLEAPP_Memory");
        }
   
        //create the Core
View Full Code Here

        super.setSpatial(spatial);

        if (spatial != null) {
            initialRotation = spatial.getLocalRotation().clone();

            inputManager.addMapping(LEFT_CLICK, new MouseButtonTrigger(MouseInput.BUTTON_LEFT));
            inputManager.addListener(actionListener, LEFT_CLICK);

            weaponEntity = ((WeaponEntity) spatial.getUserData("entity"));
        }
    }
View Full Code Here

    private Camera cam = myApp.getCamera();
    private InputManager inputManager = myApp.getInputManager();
    private String LEFT_CLICK = "leftFood";

    public FoodThrowControl() {
        inputManager.addMapping(LEFT_CLICK, new MouseButtonTrigger(MouseInput.BUTTON_LEFT));
        inputManager.addListener(this, LEFT_CLICK);
    }
View Full Code Here

    });
  }
 
  public void setAmbientLight(final boolean on) {
    if (al == null) {
      al = new AmbientLight();
      al.setColor(new ColorRGBA(1.0f, 0.92f, 0.75f, 1f));
    }
    this.enqueue(new Callable<Integer>(){
      public Integer call() throws Exception {
        if (on) {
View Full Code Here

    //addEntity(ship);
   
   
   
    //addEntity(new RoidField("Roids", "Models/RoidField/Roid.mesh.xml"));
    AmbientLight al = new AmbientLight();
    al.setColor(ColorRGBA.White.mult(0.5f));
    mapNode.addLight(al);
   
   
    /*
    DirectionalLight sun = new DirectionalLight();
View Full Code Here

  }
 
  public void setDirectionalLight(final boolean on) {
    if (dl == null) {
      Vector3f lightDir = new Vector3f(-0.8719428f, -0.46824604f, 0.14304268f);
      dl = new DirectionalLight();
      dl.setColor(new ColorRGBA(1.0f, 0.92f, 0.75f, 1f));
      dl.setDirection(lightDir);

      Vector3f lightDir2 = new Vector3f(0.70518064f, 0.5902297f, -0.39287305f);
      dl2 = new DirectionalLight();
      dl2.setColor(new ColorRGBA(0.7f, 0.85f, 1.0f, 1f));
      dl2.setDirection(lightDir2);
    }
    this.enqueue(new Callable<Integer>(){
      public Integer call() throws Exception {
View Full Code Here

TOP

Related Classes of com.jme3.scene.shape.Quad

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.