Package libshapedraw.transform

Examples of libshapedraw.transform.ShapeScale


    }

    private void createResizingShape() {
        WireframeCuboid box = new WireframeCuboid(8,63,4, 9,64,5);
        box.setLineStyle(Color.GOLD.copy(), 3.0F, true);
        ShapeScale scale = new ShapeScale(0.5, 1.0, 2.0);
        box.addTransform(scale);
        libShapeDraw.addShape(box);
        scale.animateStartLoop(2.0, 1.0, 0.5, true, 4500);

        // Since this is a simple WireframeCuboid, we could have animated
        // box.getLowerCorner() and box.getUpperCorner() instead of using a
        // ShapeScale OpenGL transform. Either method is valid, but simplicity
        // is good.
View Full Code Here


        shape.render(mc);
        assertEquals(1, shape.getCountRender());

        shape.addTransform(new ShapeRotate(45.0, 0.0, 1.0, 0.0));
        assertEquals(1, shape.getTransforms().size());
        shape.addTransform(new ShapeScale(1.0, 1.5, 1.0));
        assertEquals(2, shape.getTransforms().size());
        ShapeTranslate transform0 = new ShapeTranslate(0.0, 0.0, 18.25);
        ShapeTranslate transform1 = new ShapeTranslate(0.0, -5.0, 0.0);
        shape.addTransform(transform0).addTransform(transform1);
        assertEquals(4, shape.getTransforms().size());
View Full Code Here

        MockShape shape = new MockShape();
        final String prefix = "MockShape@" + Integer.toHexString(shape.hashCode());
        assertEquals(prefix+"{RV}(0.0,0.0,0.0)", shape.toString());
        shape.setVisible(false);
        assertEquals(prefix+"{R}(0.0,0.0,0.0)", shape.toString());
        shape.addTransform(new ShapeScale(1.0, 1.5, 1.0));
        assertEquals(prefix+"{RT}(0.0,0.0,0.0)", shape.toString());
        shape.addTransform(new ShapeTranslate(0.0, 0.0, 18.25));
        assertEquals(prefix+"{RTT}(0.0,0.0,0.0)", shape.toString());
        shape.setVisible(true);
        assertEquals(prefix+"{RVTT}(0.0,0.0,0.0)", shape.toString());
View Full Code Here

TOP

Related Classes of libshapedraw.transform.ShapeScale

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.