Package engine.geometry

Examples of engine.geometry.Circle


        } else if (shape instanceof Rectangle) {
            Rectangle rectangle = (Rectangle) shape;
            rectangle.setX(rectangle.getX() + x);
            rectangle.setY(rectangle.getY() + y);
        } else if (shape instanceof Circle) {
            Circle circle = (Circle) shape;
            circle.setX(circle.getX() + x);
            circle.setY(circle.getY() + y);
        } else if (shape instanceof Polygon) {
            Polygon polygon = (Polygon) shape;
            final int size = polygon.getSize();
            for (int i = 0; i < size; i++) {
                polygon.setVertex(i, polygon.getX(i) + x, polygon.getY(i) + y);
View Full Code Here


        centre = new Vector();
        mousePos = new Vector();
        direction = new Vector();
       
        startPoint = new Point();
        endCircle = new Circle();
        bounds = new Rectangle();
    }
View Full Code Here

        mousePos.add(direction.multiply(RADIUS));
    }

    @Override
    protected void onDraw(RenderTarget target) {
        target.drawCircle(new Circle(mousePos, 4), colour);
        target.drawCircle(new Circle(mousePos, 6), colour);
        // target.fillPolygon(bounds.toPolygon(), colour);
    }
View Full Code Here

    public double getMass() {
        return dynamic.getMass();
    }
   
    public Circle getCircle() {
        return new Circle(dynamic.getPolygon().getMid(), 40); // TODO: use the correct size
    }
View Full Code Here

        this.startPosition = startPosition;
    }

    @Override
    protected void onAdd() {
        dynamic = addHabit(new DynamicHabit(new Circle(startPosition, 8).toPolygon(16), 1));
        addHabit(new GravityHabit(dynamic));
        metal = addHabit(new MetalHabit(dynamic));
    }
View Full Code Here

TOP

Related Classes of engine.geometry.Circle

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.