Package com.ardor3d.scenegraph.shape

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


        // 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

        // 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

        // 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

        // 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

        // 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

     */
    private void setupTerrain() {
        final Box box = new Box("box", new Vector3(), 10000, 10, 10000);
        box.setModelBound(new BoundingBox());

        box.addController(new SpatialController<Box>() {
            double timer = 0;

            public void update(final double time, final Box caller) {
                timer += time;
                caller.setTranslation(Math.sin(timer) * 20.0, 0, Math.cos(timer) * 20.0);
 
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.