Examples of addController()


Examples of com.ardor3d.extension.ui.UICheckBox.addController()

        rotatingLabel.setRotation(new Matrix3().fromAngleNormalAxis(45 * MathUtils.DEG_TO_RAD, new Vector3(0, 0, 1)));
        panel.add(rotatingLabel);

        final Matrix3 rotate = new Matrix3();
        final Vector3 axis = new Vector3(0, 0, 1);
        rotatingLabel.addController(new SpatialController<UICheckBox>() {
            double angle = 0;

            public void update(final double time, final UICheckBox caller) {
                angle += time * 10;
                angle %= 360;
View Full Code Here

Examples of com.ardor3d.extension.ui.UIPanel.addController()

        minute.getTransform().setScale(scale);
        minute.setAlignment(Alignment.MIDDLE);
        minute.setPriority(2);
        multiImgBD.addImage(minute);

        clockPanel.addController(new SpatialController<Spatial>() {
            public void update(final double time, final Spatial caller) {
                //final double angle1 = _timer.getTimeInSeconds() % MathUtils.TWO_PI;
                //final double angle2 = (_timer.getTimeInSeconds() / 12.) % MathUtils.TWO_PI;

                //minute.getTransform().setRotation(new Quaternion().fromAngleAxis(angle1, Vector3.NEG_UNIT_Z));
View Full Code Here

Examples of com.ardor3d.extension.ui.UIPanel.addController()

        minute.getTransform().setScale(scale);
        minute.setAlignment(Alignment.MIDDLE);
        minute.setPriority(2);
        multiImgBD.addImage(minute);

        clockPanel.addController(new SpatialController<Spatial>() {
            public void update(final double time, final Spatial caller) {
                final double angle1 = _timer.getTimeInSeconds() % MathUtils.TWO_PI;
                final double angle2 = (_timer.getTimeInSeconds() / 12.) % MathUtils.TWO_PI;

                minute.getTransform().setRotation(new Quaternion().fromAngleAxis(angle1, Vector3.NEG_UNIT_Z));
View Full Code Here

Examples of com.ardor3d.extension.ui.UIProgressBar.addController()

        final UIProgressBar bar = new UIProgressBar("Loading: ", true);
        bar.setPercentFilled(0);
        bar.setLocalComponentWidth(250);
        bar.setMaximumContentWidth(bar.getContentWidth());
        bar.addController(new SpatialController<UIProgressBar>() {
            @Override
            public void update(final double time, final UIProgressBar caller) {
                //caller.setPercentFilled(_timer.getTimeInSeconds() / 15);
            }
        });
View Full Code Here

Examples of com.ardor3d.extension.ui.UIProgressBar.addController()

        final UIProgressBar bar = new UIProgressBar("Loading: ", true);
        bar.setPercentFilled(0);
        bar.setLocalComponentWidth(250);
        bar.setMaximumContentWidth(bar.getContentWidth());
        bar.addController(new SpatialController<UIProgressBar>() {
            @Override
            public void update(final double time, final UIProgressBar caller) {
                caller.setPercentFilled(_timer.getTimeInSeconds() / 15);
            }
        });
View Full Code Here

Examples of com.ardor3d.scenegraph.Mesh.addController()

            // Use resource name for mesh
            mesh.setName(resource.getName());

            // Add controller
            final KeyframeController<Mesh> controller = new KeyframeController<Mesh>();
            mesh.addController(controller);
            controller.setMorphingMesh(mesh);
            controller.setInterpTex(false);
            int i = 0;
            for (final Mesh meshX : meshes) {
                controller.setKeyframe(i, meshX);
View Full Code Here

Examples of com.ardor3d.scenegraph.shape.Box.addController()

        // Add a spinning 3D box to show behind UI.
        final Box box = new Box("Box", new Vector3(0, 0, 0), 5, 5, 5);
        box.setModelBound(new BoundingBox());
        box.setTranslation(new Vector3(0, 0, -15));
        box.addController(new SpatialController<Box>() {
            private final Matrix3 rotate = new Matrix3();
            private double angle = 0;
            private final Vector3 axis = new Vector3(1, 1, 0.5f).normalizeLocal();

            public void update(final double time, final Box caller) {
View Full Code Here

Examples of com.ardor3d.scenegraph.shape.Box.addController()

        // Add to root.
        _root.attachChild(_box);

        // set it to rotate:
        _box.addController(new SpatialController<Spatial>() {
            private final Vector3 _axis = new Vector3(1, 1, 0.5f).normalizeLocal();
            private final Matrix3 _rotate = new Matrix3();
            private double _angle = 0;

            public void update(final double time, final Spatial caller) {
View Full Code Here

Examples of com.ardor3d.scenegraph.shape.Box.addController()

        // Add to root.
        _root.attachChild(_box);

        // set it to rotate:
        _box.addController(new SpatialController<Spatial>() {
            private final Vector3 _axis = new Vector3(1, 1, 0.5f).normalizeLocal();
            private final Matrix3 _rotate = new Matrix3();
            private double _angle = 0;

            public void update(final double time, final Spatial caller) {
View Full Code Here

Examples of com.ardor3d.scenegraph.shape.Box.addController()

        // Add to root.
        _root.attachChild(_box);

        // set it to rotate:
        _box.addController(new SpatialController<Box>() {
            private final Vector3 _axis = new Vector3(1, 1, 0.5f).normalizeLocal();
            private final Matrix3 _rotate = new Matrix3();
            private double _angle = 0;

            public void update(final double time, final Box caller) {
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.