Package toxi.geom

Examples of toxi.geom.Polygon2D.containsPoint()


    }

    public void testContainment() {
        final Vec2D origin = new Vec2D(100, 100);
        Polygon2D p = new Circle(origin, 50).toPolygon2D(8);
        assertTrue(p.containsPoint(origin));
        assertTrue(p.containsPoint(p.vertices.get(0)));
        assertFalse(p.containsPoint(p.vertices.get(3).scale(1.01f)));
    }

    public void testIncreaseVertcount() {
View Full Code Here


    public void testContainment() {
        final Vec2D origin = new Vec2D(100, 100);
        Polygon2D p = new Circle(origin, 50).toPolygon2D(8);
        assertTrue(p.containsPoint(origin));
        assertTrue(p.containsPoint(p.vertices.get(0)));
        assertFalse(p.containsPoint(p.vertices.get(3).scale(1.01f)));
    }

    public void testIncreaseVertcount() {
        final Vec2D origin = new Vec2D(100, 100);
View Full Code Here

    public void testContainment() {
        final Vec2D origin = new Vec2D(100, 100);
        Polygon2D p = new Circle(origin, 50).toPolygon2D(8);
        assertTrue(p.containsPoint(origin));
        assertTrue(p.containsPoint(p.vertices.get(0)));
        assertFalse(p.containsPoint(p.vertices.get(3).scale(1.01f)));
    }

    public void testIncreaseVertcount() {
        final Vec2D origin = new Vec2D(100, 100);
        Polygon2D p = new Circle(origin, 50).toPolygon2D(3);
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.