Beispiel #1
0
bool CCollider::AABBCollision(CCollider & other, const double dt)
{
	Vector3 oMin = other.GetMinBound();
	Vector3 oMax = other.GetMaxBound();
	if  (	( !(m_ignore[IGNORE_X] || other.GetIgnore(IGNORE_X)) && (m_maxBound.x < oMin.x || m_minBound.x > oMax.x) ) ||
			( !(m_ignore[IGNORE_Y] || other.GetIgnore(IGNORE_Y)) && (m_maxBound.y < oMin.y || m_minBound.y > oMax.y) ) ||
			( !(m_ignore[IGNORE_Z] || other.GetIgnore(IGNORE_Z)) && (m_maxBound.z < oMin.z || m_minBound.z > oMax.z) )
		)
	{
		return false;
	}
	return true;
}