Axiom.SceneManagers.PortalConnected.Portal.intersects C# (CSharp) Method

intersects() public method

public intersects ( AxisAlignedBox aab ) : bool
aab Axiom.Math.AxisAlignedBox
return bool
		public bool intersects( AxisAlignedBox aab )
		{
			// Only check if portal is open
			if ( mOpen )
			{
				switch ( mType )
				{
					case PORTAL_TYPE.PORTAL_TYPE_QUAD:
						// since ogre doesn't have built in support for a quad, just check
						// if the box intersects both the sphere of the portal and the plane
						// this can result in false positives, but they will be minimal
						if ( !aab.Intersects( mDerivedSphere ) )
						{
							return false;
						}
						if ( aab.Intersects( mDerivedPlane ) )
						{
							return true;
						}
						break;
					case PORTAL_TYPE.PORTAL_TYPE_AABB:
						{
							// aab to aab check
							AxisAlignedBox aabb = new AxisAlignedBox( mDerivedCorners[ 0 ], mDerivedCorners[ 1 ] );
							return ( aab.Intersects( aabb ) );
						}
					case PORTAL_TYPE.PORTAL_TYPE_SPHERE:
						// aab to sphere check
						return ( aab.Intersects( mDerivedSphere ) );
				}
			}
			return false;
		}

Same methods

Portal::intersects ( PCZSceneNode pczsn ) : PortalIntersectResult
Portal::intersects ( PlaneBoundedVolume pbv ) : bool
Portal::intersects ( Ray ray ) : bool
Portal::intersects ( Sphere sphere ) : bool