Package com.ardor3d.scenegraph.extension

Examples of com.ardor3d.scenegraph.extension.SwitchNode


        t.getSceneHints().setRenderBucketType(RenderBucketType.Ortho);
        t.getSceneHints().setLightCombineMode(LightCombineMode.Off);
        t.setTranslation(new Vector3(0, 20, 0));
        _root.attachChild(t);

        final SwitchNode switchNode = new SwitchNode();

        Box box = new Box("Box", new Vector3(), 2, 1, 1);
        box.setModelBound(new BoundingBox());
        box.setTranslation(new Vector3(0, 0, 0));
        switchNode.attachChild(box);

        box = new Box("Box", new Vector3(), 1, 2, 1);
        box.setModelBound(new BoundingBox());
        box.setTranslation(new Vector3(0, 0, 0));
        box.setRandomColors();
        switchNode.attachChild(box);

        box = new Box("Box", new Vector3(), 1, 1, 2);
        box.setModelBound(new BoundingBox());
        box.setTranslation(new Vector3(0, 0, 0));
        box.setRandomColors();
        switchNode.attachChild(box);
        switchNode.getSceneHints().setCullHint(CullHint.Dynamic);

        _root.attachChild(switchNode);
        _root.getSceneHints().setCullHint(CullHint.Never);

        _logicalLayer.registerTrigger(new InputTrigger(new KeyPressedCondition(Key.SPACE), new TriggerAction() {
            public void perform(final Canvas source, final TwoInputStates inputStates, final double tpf) {
                switchNode.shiftVisibleRight();
            }
        }));

        final TextureState ts = new TextureState();
        ts.setEnabled(true);
View Full Code Here

TOP

Related Classes of com.ardor3d.scenegraph.extension.SwitchNode

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.