Package com.ardor3d.scenegraph

Examples of com.ardor3d.scenegraph.Node.attachChild()


        objects.attachChild(box);

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

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


        objects.attachChild(box);

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

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

        objects.attachChild(box);

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

        ts = new TextureState();
        t0 = TextureManager
                .load("images/ardor3d_white_256.jpg", Texture.MinificationFilter.BilinearNearestMipMap, true);
        t0.setWrap(Texture.WrapMode.Repeat);
View Full Code Here

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

        return objects;
    }

    /**
 
View Full Code Here

        final double infoStartY = _canvas.getCanvasRenderer().getCamera().getHeight() / 2;
        for (int i = 0; i < _exampleInfo.length; i++) {
            _exampleInfo[i] = BasicText.createDefaultTextLabel("Text", "", 16);
            _exampleInfo[i].setTranslation(new Vector3(10, infoStartY - i * 20, 0));
            textNodes.attachChild(_exampleInfo[i]);
        }

        textNodes.updateGeometricState(0.0);
        updateText();

View Full Code Here

        }

        // Create a single Mesh from the origNode and its children.
        final Mesh merged = MeshCombiner.combine(origNode);
        // attach to scene.. default will be to show the merged version first
        scene.attachChild(merged);

        // Use VBO, if indicated. This improves the rendering speed of the merged mesh.
        // Note that sometimes it is not efficient/possible to turn on VBO for tons of small meshes, but works well for
        // a single larger combined mesh.
        if (useVBO) {
View Full Code Here

            @Override
            public void perform(final Canvas source, final TwoInputStates inputState, final double tpf) {
                showMerged = !showMerged;
                if (showMerged) {
                    origNode.removeFromParent();
                    scene.attachChild(merged);
                } else {
                    merged.removeFromParent();
                    scene.attachChild(origNode);
                }
                updateMergedLabel();
View Full Code Here

                if (showMerged) {
                    origNode.removeFromParent();
                    scene.attachChild(merged);
                } else {
                    merged.removeFromParent();
                    scene.attachChild(origNode);
                }
                updateMergedLabel();
            }
        }));
View Full Code Here

        for (int i = 0; i < 500; i++) {
            final Mesh sm = sphere.makeCopy(true);

            sm.setTranslation(new Vector3(rand.nextDouble() * 100.0 - 50.0, rand.nextDouble() * 100.0 - 50.0, rand
                    .nextDouble() * 100.0 - 50.0));
            n1.attachChild(sm);
        }

        final Node n2 = n1.makeCopy(true);
        n2.setTranslation(new Vector3(50, 0, -200));

View Full Code Here

        final double infoStartY = _canvas.getCanvasRenderer().getCamera().getHeight() / 2;
        for (int i = 0; i < _exampleInfo.length; i++) {
            _exampleInfo[i] = BasicText.createDefaultTextLabel("Text", "", 16);
            _exampleInfo[i].setTranslation(new Vector3(10, infoStartY - i * 20, 0));
            textNodes.attachChild(_exampleInfo[i]);
        }

        textNodes.updateGeometricState(0.0);
        updateText();

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.