Package com.ardor3d.scenegraph.extension

Examples of com.ardor3d.scenegraph.extension.BillboardNode


                TextureStoreFormat.GuessCompressedFormat, true));

        _root.setRenderState(ts);

        final Quad quad = new Quad("Quad", 5, 5);
        final BillboardNode billboard = new BillboardNode("Billboard");
        billboard.setAlignment(BillboardAlignment.ScreenAligned);
        billboard.attachChild(quad);
        _root.attachChild(billboard);

        _logicalLayer.registerTrigger(new InputTrigger(new KeyPressedCondition(Key.SPACE), new TriggerAction() {
            public void perform(final Canvas source, final TwoInputStates inputStates, final double tpf) {
                int ordinal = billboard.getAlignment().ordinal() + 1;
                if (ordinal > BillboardAlignment.values().length - 1) {
                    ordinal = 0;
                }
                billboard.setAlignment(BillboardAlignment.values()[ordinal]);
                t.setText("[SPACE] " + billboard.getAlignment());
            }
        }));
    }
View Full Code Here

TOP

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

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.