示例#1
0
template<class T1, class T2> bool isIntersecting(T1& mA, T2& mB)
{
	return mA.right() >= mB.left() && 
			mA.left() <= mB.right() &&
			mA.bottom() >= mB.top() && 
			mA.top() <= mB.bottom();
}
示例#2
0
 static bool isIntersecting(const T1& mA, const T2& mB) noexcept
 {
     return mA.right()  >= mB.left() 
         && mA.left()   <= mB.right()
         && mA.bottom() >= mB.top() 
         && mA.top()    <= mB.bottom();
 }
示例#3
0
bool isIntersecting(T1& mA, T2& mB)
{
    return mA.right() >= mB.left() && mA.left() <= mB.right() &&
           mA.bottom() >= mB.top() && mA.top() <= mB.bottom();
}
示例#4
0
bool isIntersecting(const T1& mA, const T2& mB) noexcept
{
    // {Info: AABB vs AABB collision}
    return mA.right() >= mB.left() && mA.left() <= mB.right() &&
           mA.bottom() >= mB.top() && mA.top() <= mB.bottom();
}