i need an aabb intersection test

Started by
2 comments, last by jacksaccountongamedev 19 years, 5 months ago
god this is driving me insane, ive been on the net for an hour and i cant find one example of a c++ aabb interection test
"am i supposed to be able to do sh_t with this?" oink snort
Advertisement
This talks quite a bit about aabb and it was my first hit as well
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="88" height="70" id="H2lvl" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="http://www.ironhive.com/CFCs/H2lvl.swf?gamertag=jBaddog" /> <param name="quality" value="high" /> <param name="wmode" value="transparent"> <embed src="http://www.ironhive.com/CFCs/H2lvl.swf?gamertag=jBaddog" quality="high" bgcolor="#ffffff" width="88" height="70" name="H2lvl" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object>
i need aabb vs aabb intersection test
In two dimensions:

bool AABBAABBIntersection( Vector2D p1, Vector2D p2, Vector2D p3, Vector2D p4 ){	if( ( min( p1.x, p2.x ) > max( p3.x, p4.x ) ) |		( max( p1.x, p2.x ) < min( p3.x, p4.x ) ) |		( min( p1.y, p2.y ) > max( p3.y, p4.y ) ) |		( max( p1.y, p2.y ) < min( p3.y, p4.y ) ) )		return false;	return true;}


Hope this helps,
Jackson Allan

This topic is closed to new replies.

Advertisement