Does ImageCollide check image rectangles first?

BlitzMax Forums/BlitzMax Programming/Does ImageCollide check image rectangles first?

Rico(Posted 2011) [#1]
i use the ImagesCollide command to do pixel perfect collision detection. i was wondering if for speed reasons if i should should do an ImagesRect check first to see if the image bounding boxes collide? and then if they do - then do a pixel perfect check.... *or* is this bounding box check already taken care of in the programming code within the ImagesCollide routine?

thank you for any help :)


Rico(Posted 2011) [#2]
anyone know anything about this?

im not sure if i explained myself that well. but i wanted to know if the ImagesCollide command includes a bounding box check in it's code routine. because if it does there would be no point in me doing an ImageRectCollide command first. thank you :)


Sanctus(Posted 2011) [#3]
As far as I remember from when I ported the code to c++, it does.


ima747(Posted 2011) [#4]
I think it does as well but can't remember why I think that. You could pick apart the module or make a speed test to verify...


Rico(Posted 2011) [#5]
ok good to know it does. i would have thought that it would do. thank you! :)


Grey Alien(Posted 2011) [#6]
I asked the same question years ago and was told yes.