Examples of reduceVertices()


Examples of toxi.geom.Polygon2D.reduceVertices()

    }

    public void testReduce() {
        Polygon2D p = new Circle(100).toPolygon2D(30);
        float len = p.vertices.get(0).distanceTo(p.vertices.get(1));
        p.reduceVertices(len * 0.99f);
        assertEquals(30, p.getNumVertices());
        p.reduceVertices(len * 1.5f);
        assertEquals(15, p.getNumVertices());
    }
}
View Full Code Here

Examples of toxi.geom.Polygon2D.reduceVertices()

    public void testReduce() {
        Polygon2D p = new Circle(100).toPolygon2D(30);
        float len = p.vertices.get(0).distanceTo(p.vertices.get(1));
        p.reduceVertices(len * 0.99f);
        assertEquals(30, p.getNumVertices());
        p.reduceVertices(len * 1.5f);
        assertEquals(15, p.getNumVertices());
    }
}
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.