On Apr 7, 2008, at 2:30 PM, Eric Cooper wrote:
w += 2 * (( p[ip].y > p[i].y ) ? 1 : 0) - 1;
Ah yup. I didn't compile that bit yet.
That was my reference code from the previous project and just copy/
pasted it with the change for function name and comments. I guess I
shouldn't be surprised
jon,
thanks! my polygons are only triangles and quadrilaterals at this point, but
your method works beautifully for
concave quads. I did have to change one line (which appears a few times) in
order to compile:
w += 2 * ( p[ip].y >
p[i].y
On Apr 7, 2008, at 8:46 AM, Jon Bradley wrote:
/**
* Point inside polygon using winding number method
* q Point2d A point 2d structure with x,y properties
* p Polygon A polygon as an array of points in
clockwise order
* returns Boo
On Apr 4, 2008, at 5:54 PM, Eric Cooper wrote:
FWIW, I decided to write my own hit test using dot products for
concave polygons. I will
need to do something a bit more involved for convex polygons, but I
don't need that
immediately.
Give this a shot. This is from my AS3 boolean library I'
FWIW, I decided to write my own hit test using dot products for concave
polygons. I will
need to do something a bit more involved for convex polygons, but I don't need
that
immediately.
I would still be interested to answer to my original question, if anyone knows
the answer.
Alternatively, a
5 matches
Mail list logo