From 98437cad0a3a59245e5fe772d4e310de4228757a Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Thu, 19 Apr 2012 09:41:27 +0100 Subject: cleaning up --- gaunt01/src/testApp.cpp | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'gaunt01/src/testApp.cpp') diff --git a/gaunt01/src/testApp.cpp b/gaunt01/src/testApp.cpp index 785eb5a..a78a690 100644 --- a/gaunt01/src/testApp.cpp +++ b/gaunt01/src/testApp.cpp @@ -14,38 +14,6 @@ Is this too much work for every frame? Should it be put in a seperate thread? */ -bool OutsidePolygon(vector& polygon,ofPoint p) -//thanks to Paul Bourke -//http://local.wasp.uwa.edu.au/~pbourke/geometry/insidepoly/ -{ - int counter = 0; - int i; - double xinters; - ofPoint p1,p2; - - p1 = polygon[0]; - for (i=1;i<=polygon.size();i++) { - p2 = polygon[i % polygon.size()]; - if (p.y > min(p1.y,p2.y)) { - if (p.y <= max(p1.y,p2.y)) { - if (p.x <= max(p1.x,p2.x)) { - if (p1.y != p2.y) { - xinters = (p.y-p1.y)*(p2.x-p1.x)/(p2.y-p1.y)+p1.x; - if (p1.x == p2.x || p.x <= xinters) - counter++; - } - } - } - } - p1 = p2; - } - - if (counter % 2 == 0) - return true; - else - return false; -} - void testApp::setup(){ bLearnBakground = true; -- cgit v1.2.3