Examples of attachChild()


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

    t1.setEnvironmentalMapMode( Texture.EM_SPHERE );
    ts.setTexture( t0, 0 );
    ts.setTexture( t1, 1 );
    ts.setEnabled( true );
    torus.setRenderState( ts );
    objects.attachChild( torus );

    ts = display.getRenderer().createTextureState();
    t0 = TextureManager.loadTexture(
        TestSimpleQuadWater.class.getClassLoader().getResource(
            "jmetest/data/texture/wall.jpg" ),
View Full Code Here

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

    ts.setTexture( t0 );

    Box box = new Box( "box1", new Vector3f( -10, -10, -10 ), new Vector3f( 10, 10, 10 ) );
    box.setLocalTranslation( new Vector3f( 0, -7, 0 ) );
    box.setRenderState( ts );
    objects.attachChild( box );

    box = new Box( "box2", new Vector3f( -5, -5, -5 ), new Vector3f( 5, 5, 5 ) );
    box.setLocalTranslation( new Vector3f( 15, 10, 0 ) );
    box.setRenderState( ts );
    objects.attachChild( box );
View Full Code Here

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

    objects.attachChild( box );

    box = new Box( "box2", new Vector3f( -5, -5, -5 ), new Vector3f( 5, 5, 5 ) );
    box.setLocalTranslation( new Vector3f( 15, 10, 0 ) );
    box.setRenderState( ts );
    objects.attachChild( box );

    box = new Box( "box3", new Vector3f( -5, -5, -5 ), new Vector3f( 5, 5, 5 ) );
    box.setLocalTranslation( new Vector3f( 0, -10, 15 ) );
    box.setRenderState( ts );
    objects.attachChild( box );
View Full Code Here

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

    objects.attachChild( box );

    box = new Box( "box3", new Vector3f( -5, -5, -5 ), new Vector3f( 5, 5, 5 ) );
    box.setLocalTranslation( new Vector3f( 0, -10, 15 ) );
    box.setRenderState( ts );
    objects.attachChild( box );

    box = new Box( "box4", new Vector3f( -5, -5, -5 ), new Vector3f( 5, 5, 5 ) );
    box.setLocalTranslation( new Vector3f( 20, 0, 0 ) );
    box.setRenderState( ts );
    objects.attachChild( box );
View Full Code Here

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

    objects.attachChild( box );

    box = new Box( "box4", new Vector3f( -5, -5, -5 ), new Vector3f( 5, 5, 5 ) );
    box.setLocalTranslation( new Vector3f( 20, 0, 0 ) );
    box.setRenderState( ts );
    objects.attachChild( box );

    ts = display.getRenderer().createTextureState();
    t0 = TextureManager.loadTexture(
        TestSimpleQuadWater.class.getClassLoader().getResource(
            "jmetest/data/images/Monkey.jpg" ),
View Full Code Here

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

    box = new Box( "box5", new Vector3f( -50, -2, -50 ), new Vector3f( 50, 2, 50 ) );
    box.setLocalTranslation( new Vector3f( 0, -15, 0 ) );
    box.setRenderState( ts );
    box.setModelBound( new BoundingBox() );
    box.updateModelBound();
    objects.attachChild( box );

    return objects;
  }

  private void setupKeyBindings() {
View Full Code Here

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

    this.attachChild(getClodNodeFromParent((Node)model));
  }
 
  public static Node getModelNode(String filename) throws MalformedURLException {
    Node parent = new Node();
    parent.attachChild(loadModel(new File(filename).toURI().toURL()));
    System.out.println("Model " + filename + " loaded");
    if(parent == null) {
      System.out.println(" model is null");
    }
    Node clod = getClodNodeFromParent(parent);
View Full Code Here

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

        Node clodNode = new Node("Clod node");
        // For each mesh in maggie
        for (int i = 0; i < meshParent.getQuantity(); i++){
            final Spatial child = meshParent.getChild(i);
            if(child instanceof Node) {
                clodNode.attachChild(getClodNodeFromParent((Node)child));
            }
            else if ( child instanceof TriMesh ) {
                // Create an AreaClodMesh for that mesh.  Let it compute records automatically
                AreaClodMesh acm = new AreaClodMesh("part"+i,(TriMesh)child, null);
                acm.setModelBound(new BoundingSphere());
View Full Code Here

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

                // Give the clodMesh node the material state that the original had.
                acm.setRenderState(child.getRenderState(RenderState.RS_MATERIAL));

                // Attach clod node.
                clodNode.attachChild(acm);
            }
            else
            {
                System.err.println("Unhandled Spatial type: " + child.getClass());
            }
View Full Code Here

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

                        batchTool.createVegetationMesh(2, 3, VegetationManager.VEGETATION_PACK_SIZE )});
               
        }
        //TODO: LOD
        Node n = new Node();
        n.attachChild(vegetationMeshBank.get(index)[0]);
        vegetationNodeBank.put(index, n);

        VegetationManager.applyVegetationTexture((short)0, n);
           n.setLightCombineMode(LightCombineMode.Off);
        return n;
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.