Axiom.SceneManagers.Octree.OctreeSceneManager.Intersect C# (CSharp) Метод

Intersect() публичный Метод

public Intersect ( Axiom.MathLib.AxisAlignedBox box1, Axiom.MathLib.AxisAlignedBox box2 ) : Intersection
box1 Axiom.MathLib.AxisAlignedBox
box2 Axiom.MathLib.AxisAlignedBox
Результат Intersection
		public Intersection Intersect( AxisAlignedBox box1, AxisAlignedBox box2 )
		{
			intersect++;
			Vector3[] outside = box1.Corners;
			Vector3[] inside = box2.Corners;

			if ( inside[ 4 ].x < outside[ 0 ].x ||
				inside[ 4 ].y < outside[ 0 ].y ||
				inside[ 4 ].z < outside[ 0 ].z ||
				inside[ 0 ].x > outside[ 4 ].x ||
				inside[ 0 ].y > outside[ 4 ].y ||
				inside[ 0 ].z > outside[ 4 ].z )
			{

				return Intersection.Outside;
			}

			if ( inside[ 0 ].x > outside[ 0 ].x &&
				inside[ 0 ].y > outside[ 0 ].y &&
				inside[ 0 ].z > outside[ 0 ].z &&
				inside[ 4 ].x < outside[ 4 ].x &&
				inside[ 4 ].y < outside[ 4 ].y &&
				inside[ 4 ].z < outside[ 4 ].z )
			{

				return Intersection.Inside;
			}
			else
			{
				return Intersection.Intersect;
			}
		}

Same methods

OctreeSceneManager::Intersect ( Axiom.MathLib.Sphere sphere, Axiom.MathLib.AxisAlignedBox box ) : Intersection