A quick class I whipped up so that I'll be able to out-of-bounds checking while still keeping a much quicker play-it-forward algorithm. It should work for any dimensioned quad that doesn't have any almost-vertical lines (ie. that 0.00000001 I added in causes a division by 0). I haven't tested it, but it looks right. So be warned! It's released as free code - no restrictions, as long as you don't charge money for it =). The other thing is that you can't put two diagonally opposite points as adjacent arguments when creating the quad.
|