Exemple #1
0
	eFrustumCollision cFrustum::CollideBoundingVolume(cBoundingVolume *a_BV)
	{
		if (CollideFrustumSphere(a_BV) == eFrustumCollision_Outside)
			return eFrustumCollision_Outside;

		eFrustumCollision ret = CollideBVSphere(a_BV);

		if (ret == eFrustumCollision_Intersect)
			return CollideBVAABB(a_BV);

		return ret;
	}
Exemple #2
0
	eFrustumCollision cFrustum::CollideBoundingVolume(cBoundingVolume* aBV)
	{
		//Check if the BV is in the Frustum sphere.
		if(CollideFustrumSphere(aBV) == eFrustumCollision_Outside)
		{
			return eFrustumCollision_Outside;
		}
		
		//Do a simple sphere collide test
		eFrustumCollision ret = CollideBVSphere(aBV);
		
		//If there was an intersection, collide with the AABB
		if(ret == eFrustumCollision_Intersect)
		{
			return 	CollideBVAABB(aBV);
		}

		return ret;
	}