From c798add33a00d5400cbdf4ee1aa0bcfea651768b Mon Sep 17 00:00:00 2001 From: Kevin T Pratt Date: Wed, 2 Dec 2015 23:58:42 -0500 Subject: [PATCH] Delete Point.pde --- stuff/tree/Point.pde | 53 -------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 stuff/tree/Point.pde diff --git a/stuff/tree/Point.pde b/stuff/tree/Point.pde deleted file mode 100644 index 672655b..0000000 --- a/stuff/tree/Point.pde +++ /dev/null @@ -1,53 +0,0 @@ -class Point { - float _r = 30; - float _x; - float _y; - boolean _isSelected; - - Point(float x0, float y0) { - _x = x0; - _y = y0; - _isSelected = false; - } - - void draw() { - pushStyle(); - //stroke(c_pointStroke); - //fill((_isSelected) ? c_pointSelect : c_pointDefault); - ellipse(_x, _y, _r, _r); - popStyle(); - } - - float dist2(Point q){ - return (q._x - _x)*(q._x - _x) + (q._y - _y)*(q._y - _y); - } - - boolean isSelectedPoint(float x, float y) { - return (x - _x)*(x - _x) + (y - _y) * (y - _y) < _r * _r; - } - - boolean isSelectedCir(float x, float y, float r) { - return (x - _x)*(x - _x) + (y - _y)*(y - _y) < r * r; - } - - //boolean isSelectedRect(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4) { - // int l0 = lineSideTest(x1, y1, x2, y2, _x, _y); - // int l1 = lineSideTest(x2, y2, x3, y3, _x, _y); - // int l2 = lineSideTest(x3, y3, x4, y4, _x, _y); - // int l3 = lineSideTest(x4, y4, x1, y1, _x, _y); - - // return (l0 == l1) && (l1 == l2) && (l2 == l3); - //} - - void setSelected() { - _isSelected = true; - } - - void setUnSelected() { - _isSelected = false; - } - - void toggleSelected() { - _isSelected = !_isSelected; - } -} \ No newline at end of file