Package com.ardor3d.extension.interact.widget

Examples of com.ardor3d.extension.interact.widget.CompoundInteractWidget


        // create our manager
        manager = new InteractManager();
        manager.setupInput(_canvas, _physicalLayer, _logicalLayer);

        // final add our widget
        final CompoundInteractWidget widget = new CompoundInteractWidget()
                .withMoveXAxis(new ColorRGBA(1, 0, 0, .65f), 1.2, .15, .5, .2)
                .withMoveZAxis(new ColorRGBA(0, 0, 1, .65f), 1.2, .15, .5, .2) //
                .withRotateYAxis() //
                .withPlanarHandle(MovePlane.XZ, new ColorRGBA(1, 0, 1, .65f)) //
                .withRingTexture((Texture2D) TextureManager.load("images/tick.png", MinificationFilter.Trilinear, true));
        // widget.getHandle().setRenderState(_lightState);
        manager.addWidget(widget);
        manager.setActiveWidget(widget);

        // add toggle for matrix mode on widget
        manager.getLogicalLayer().registerTrigger(new InputTrigger(new KeyPressedCondition(Key.R), new TriggerAction() {
            @Override
            public void perform(final Canvas source, final TwoInputStates inputStates, final double tpf) {
                widget.setInteractMatrix(widget.getInteractMatrix() == InteractMatrix.World ? InteractMatrix.Local
                        : InteractMatrix.World);
                widget.targetDataUpdated(manager);
            }
        }));

        // add a filter
        manager.addFilter(new TerrainHeightFilter(terrain, 20));
View Full Code Here

TOP

Related Classes of com.ardor3d.extension.interact.widget.CompoundInteractWidget

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.