Question about polygon clipping
Closed this issue ยท 2 comments
Hi - great library as always. ๐
One question - in the readme you mention it could be used for polygon clipping. Can you give a hint to how that might work? Or did that refer testing whether polygons overlap a clipping area, as opposed to actually doing the clipping?
(My motivation here is wondering whether box-intersect could be useful in frustum-culling a 3D scene, faster than with octrees.)
Thanks!
Hi,
I think that for frustum culling a 3D scene you might be better off just
brute forcing the whole thing (via an O(n) scan of the data) than using
box-intersect (which takes O(n log^3(n)) time. Octrees would probably be
even slower.
On Sat, Apr 4, 2015 at 10:36 PM, Andy Hall notifications@github.com wrote:
Hi - great library as always. [image: ๐]
One question - in the readme you mention it could be used for polygon
clipping. Can you give a hint to how that might work? Or did that refer
testing whether polygons overlap a clipping area, as opposed to actually
doing the clipping?(My motivation here is wondering whether box-intersect could be useful in
frustum-culling a 3D scene, faster than with octrees.)Thanks!
โ
Reply to this email directly or view it on GitHub
#2.
Thanks, that makes sense. I'd thought Octrees would in principle be under linear time, but guess I it depends on having an ideally constructed octree.