Ejemplo n.º 1
0
bool CollisionBox::didCollide(const CollisionBox& b) const
{
	vec3 v1=b.getPoint1()-this->getPoint2();
	vec3 v2=b.getPoint2()-this->getPoint1();

	if((v1.x>0)!=(v2.x>0)){
		if((v1.y>0)!=(v2.y>0)){
			if((v1.z>0)!=(v2.z>0)){
				//std::cout<<"TEST"<<std::endl;
				return true;
			}
		}
	}

	return false;
}