Page 1 of 1

Visibility culling for chipmunk

Posted: Fri May 08, 2009 2:57 am
by santagada
Is there a way to query the space hash for everything inside a AABB? This could be used for visibility culling, so you only need to draw what is visible. This way you don't need two different structures one to collisions (and everything else a physics engine do) and another for visibility. I think the functions would be kind of like the cpSpaceShapePointQuery/cpSpaceStaticShapePointQuery ones.

Re: Visibility culling for chipmunk

Posted: Fri May 08, 2009 3:16 am
by santagada
I actually looked at the code and it appears that the code on cpSpaceHash already exists in the function cpSpaceHashQuery, I just need to call it like the cpSpaceShapePointQuery calls cpSpaceHashPointQuery.