Package com.jme3.scene

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


    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);
  }

  public void update(float tpf) {
    Matrix4f cameraToWorld = geom.getWorldMatrix();

View Full Code Here


  ls.attach(l);
  node.setRenderState(ls);
        */


  node.attachChild(model.root);
  rootNode.attachChild(node);

  //lightState.detachAll();
    }
// ============= Internal Classes ============== //
View Full Code Here

  Node node = new Node();
  try{
            Spatial spatial = assetManager.loadModel(obj);
            //Material mat = new Material(assetManager, "Common/MatDefs/Misc/ShowNormals.j3md");
            //spatial.setMaterial(mat);
            node.attachChild(spatial);

      node.setModelBound(new BoundingSphere());
      node.updateModelBound();
  } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

    int i = 0;
    float size = 0.65f;
    for (char c : text.toCharArray()) {
      Spatial letter = loadLetter(String.valueOf(c));
      letter.setLocalTranslation(size*i, 0, 0);
      word.attachChild(letter);
      i++;
    }
    return word;
  }
 
View Full Code Here

        rootNode.addLight(sun);
       
        Spatial sky = SkyFactory.createSky(assetManager, "Scenes/Beach/FullskiesSunset0068.dds", false);
        sky.setLocalScale(350);
       
        mainScene.attachChild(sky);
       
        water = new WaterFilter(rootNode, lightDir);
       
        FilterPostProcessor fpp = myApp.getFpp();
       
View Full Code Here

        rootNode.attachChild(mainScene);

        Spatial sky = SkyFactory.createSky(assetManager, "Scenes/Beach/FullskiesSunset0068.dds", false);
        sky.setLocalScale(350);

        mainScene.attachChild(sky);

        water = new WaterFilter(rootNode, lightDir);

        FilterPostProcessor fpp = new FilterPostProcessor(assetManager);
View Full Code Here

        Node node = new Node("NavMeshes");
        TiledNavMesh[] array = Singleton.get().getNavManager().getNavMeshes();;
        for(TiledNavMesh t : array){
          Geometry g = t.getDebugMesh();
          g.setMaterial(matWireframe);
          node.attachChild(g);
        }
        navs.attachChild(node);   
      }
    }
View Full Code Here

            mat.setColor("Color", ColorRGBA.Blue);
        TiledNavMesh[] array = Singleton.get().getNavManager().getNavMeshes();
        for(TiledNavMesh t : array){
          Geometry g = t.getDebugBorderMesh();
          g.setMaterial(mat);
          node.attachChild(g);
        }
        navs.attachChild(node);
      }
    }
    private void printCamLocation() {
View Full Code Here

      m.attachVisuals();
//      if(n != null){ 
        ent = em.createEntity(_1000);
       
        Node nn = new Node("intermed");
        nn.attachChild(m);
        ent.attachChild(nn);
       
        rootNode.attachChild(ent);
        VisualComponent vis = new VisualComponent();
        EnvironmentComponent env = new EnvironmentComponent();
View Full Code Here

        Node node = new Node("NavMeshes");
        TiledNavMesh[] array = Singleton.get().getNavManager().getNavMeshes();
        for(TiledNavMesh t : array){
          Geometry g = t.getDebugMesh();
          g.setMaterial(matWireframe);
          node.attachChild(g);
        }
        navs.attachChild(node);   
      }
    }
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.