From 5730e7768e605990191f0c5803b3358191cb1ea1 Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Tue, 6 May 2014 22:06:02 -0400 Subject: Added back those files Luke deleted and added circle display (positions may need to be fiddled with) --- src/us/minak/MetaCircle.java | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/us/minak/MetaCircle.java (limited to 'src/us/minak/MetaCircle.java') diff --git a/src/us/minak/MetaCircle.java b/src/us/minak/MetaCircle.java new file mode 100644 index 0000000..908842a --- /dev/null +++ b/src/us/minak/MetaCircle.java @@ -0,0 +1,29 @@ +package us.minak; + +/* + * Not sure if this should be drawable or what. + * + */ +public class MetaCircle { + public MetaExpression metaExpr; + public float x; + public float y; + public float radius; + public int color; + public boolean expanded; + public int expansion; //the level of expansion (if multiple circles are expanded, this decides precidence) + + MetaCircle(float x, float y, float radius, int color, MetaExpression metaExpr) { + this.metaExpr = metaExpr; + this.x = x; + this.y = y; + this.radius = radius; + this.color = color; + this.expanded = false; + this.expansion = 0; + } + + public boolean containsPoint(float x, float y) { + return Math.pow(x - this.x, 2) + Math.pow(y - this.y, 2) < Math.pow(this.radius, 2) ? true : false; + } +} -- cgit v1.2.3