Examples of attachChild()


Examples of com.jme.scene.Node.attachChild()

        subNode[4] = new Node("pyramids");
        triMesh[4] = new Pyramid("pyramid", 10, 10);
        triMesh[4].setModelBound(new BoundingBox());

        for (int i = 0; i < subNode.length; i++) {
            node.attachChild(subNode[i]);
           
        }
        List<Vector3f> linesPoint = new ArrayList<Vector3f>(count);
        float halfBoxSize = boxSize * 0.5f;
        for (int i = 0; i < count; i++) {
View Full Code Here

Examples of com.jme.scene.Node.attachChild()

        }
        Geometry regularGrid = new Line("regularLine", regularVertices.toArray(new Vector3f[] {}), null, null, null);
        regularGrid.getDefaultColor().set(new ColorRGBA(1, 1, 1, 0.05f));
        regularGrid.setModelBound(new BoundingBox());
        regularGrid.updateModelBound();
        lines.attachChild(regularGrid);
        Geometry markerGrid = new Line("markerLine", markerVertices.toArray(new Vector3f[] {}), null, null, null);
        markerGrid.getDefaultColor().set(new ColorRGBA(1, 1, 1, 0.1f));
        markerGrid.setModelBound(new BoundingBox());
        markerGrid.updateModelBound();
        lines.attachChild(markerGrid);
View Full Code Here

Examples of com.jme.scene.Node.attachChild()

        lines.attachChild(regularGrid);
        Geometry markerGrid = new Line("markerLine", markerVertices.toArray(new Vector3f[] {}), null, null, null);
        markerGrid.getDefaultColor().set(new ColorRGBA(1, 1, 1, 0.1f));
        markerGrid.setModelBound(new BoundingBox());
        markerGrid.updateModelBound();
        lines.attachChild(markerGrid);
        if (rotation != null) lines.getLocalRotation().fromAngles(rotation.x, rotation.y, rotation.z);

        Node axis = new Node("axis");
        this.attachChild(axis);
        Vector3f xAxis = new Vector3f(size + (marker * spacing), 0, 0); // red
View Full Code Here

Examples of com.jme.scene.Node.attachChild()

        lx.updateModelBound();
        ly.setModelBound(new BoundingBox());
        ly.updateModelBound();
        lz.setModelBound(new BoundingBox());
        lz.updateModelBound();
        axis.attachChild(lx);
        axis.attachChild(ly);
        axis.attachChild(lz);

        TextureState ts = DisplaySystem.getDisplaySystem().getRenderer().createTextureState();
View Full Code Here

Examples of com.jme.scene.Node.attachChild()

        ly.setModelBound(new BoundingBox());
        ly.updateModelBound();
        lz.setModelBound(new BoundingBox());
        lz.updateModelBound();
        axis.attachChild(lx);
        axis.attachChild(ly);
        axis.attachChild(lz);

        TextureState ts = DisplaySystem.getDisplaySystem().getRenderer().createTextureState();

        this.setTextureCombineMode(TextureCombineMode.Off);
View Full Code Here

Examples of com.jme.scene.Node.attachChild()

        ly.updateModelBound();
        lz.setModelBound(new BoundingBox());
        lz.updateModelBound();
        axis.attachChild(lx);
        axis.attachChild(ly);
        axis.attachChild(lz);

        TextureState ts = DisplaySystem.getDisplaySystem().getRenderer().createTextureState();

        this.setTextureCombineMode(TextureCombineMode.Off);
        this.setRenderState(ts);
View Full Code Here

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

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

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


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

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

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

  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

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

    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
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.