Package libshapedraw

Examples of libshapedraw.MockMinecraftAccess.reset()


        for (boolean twice : new boolean[] {true, false}) {
            WireframeCuboid shape = new WireframeCuboid(1.0,2.0,3.0, 4.0,5.0,6.0);
            shape.setLineStyle(Color.WHITE.copy(), 1.0F, twice);
            assertEquals(twice, shape.isVisibleThroughTerrain());

            mc.reset();
            shape.render(mc);
            mc.assertCountsEqual(3, 16, twice);
            shape.render(mc);
            shape.render(mc);
            shape.render(mc);
View Full Code Here


            WireframeLine shape = new WireframeLine(1.0,2.0,3.0, 4.0,5.0,6.0);
            shape.setLineStyle(Color.WHITE.copy(), 1.0F, false);
            shape.setLineStyle(Color.RED.copy(), 2.0F, twice);
            assertEquals(twice, shape.isVisibleThroughTerrain());

            mc.reset();
            shape.render(mc);
            mc.assertCountsEqual(1, 2, twice);
            shape.render(mc);
            shape.render(mc);
            shape.render(mc);
View Full Code Here

            // revert to the default line style
            shape.setLineStyle(null);
            assertSame(LineStyle.DEFAULT, shape.getEffectiveLineStyle());
            assertTrue(shape.isVisibleThroughTerrain());
            mc.reset();
            shape.render(mc);
            mc.assertCountsEqual(1, 2, true);
            shape.render(mc);
            shape.render(mc);
            shape.render(mc);
View Full Code Here

            shape.setLineStyle(Color.WHITE.copy(), 1.0F, seeThru);
            shape.setBlendToLineStyle(Color.RED.copy().setAlpha(0.5), 5.0F, seeThru);
            assertEquals(seeThru, shape.isVisibleThroughTerrain());

            // No points == nothing to render
            mc.reset();
            shape.render(mc);
            mc.assertCountsEqual(0, 0, seeThru);
            shape.render(mc);
            shape.render(mc);
            shape.render(mc);
View Full Code Here

            shape.render(mc);
            mc.assertCountsEqual(0, 0, seeThru);
   
            // Only one point makes no lines
            arr.add(new Vector3(0.0, 5.5, -12.5));
            mc.reset();
            shape.render(mc); // deferred to WireframeLines
            mc.assertCountsEqual(1, 1, seeThru);
            shape.render(mc);
            shape.render(mc);
            shape.render(mc);
View Full Code Here

            shape.render(mc);
            mc.assertCountsEqual(4, 4, seeThru);
   
            // Two points make one line
            arr.add(new Vector3(7.0, 5.5, -12.5));
            mc.reset();
            shape.render(mc);
            mc.assertCountsEqual(1, 2, seeThru);
            shape.render(mc);
            shape.render(mc);
            shape.render(mc);
View Full Code Here

            shape.render(mc);
            mc.assertCountsEqual(4, 8, seeThru);
   
            // Three points make two lines
            arr.add(new Vector3(7.0, 15.5, -12.5));
            mc.reset();
            shape.render(mc);
            mc.assertCountsEqual(2, 4, seeThru);
            shape.render(mc);
            shape.render(mc);
            shape.render(mc);
View Full Code Here

            arr.add(new Vector3(12.0, 7.5, -3.5));
            arr.add(new Vector3(10.0, 7.5, 3.5));
            arr.add(new Vector3(10.0, 7.5, 6.0));
            arr.add(new Vector3(20.0, 17.5, 6.0));
            assertEquals(11, arr.size());
            mc.reset();
            shape.render(mc);
            mc.assertCountsEqual(10, 20, seeThru);
            shape.render(mc);
            shape.render(mc);
            shape.render(mc);
View Full Code Here

            shape.render(mc);
            mc.assertCountsEqual(40, 80, seeThru);

            // Add a render cap, we only render that many lines
            shape.setRenderCap(5);
            mc.reset();
            shape.render(mc);
            mc.assertCountsEqual(5, 10, seeThru);
            shape.render(mc);
            shape.render(mc);
            shape.render(mc);
View Full Code Here

            shape.render(mc);
            mc.assertCountsEqual(20, 40, seeThru);

            // Remove the render cap, we render everything again
            shape.setRenderCap(-1);
            mc.reset();
            shape.render(mc);
            mc.assertCountsEqual(10, 20, seeThru);
            shape.render(mc);
            shape.render(mc);
            shape.render(mc);
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.