FarseerPhysics.Dynamics.World.rayCastCallbackWrapper C# (CSharp) Method

rayCastCallbackWrapper() private method

private rayCastCallbackWrapper ( RayCastInput rayCastInput, int proxyId ) : float
rayCastInput RayCastInput
proxyId int
return float
		float rayCastCallbackWrapper( RayCastInput rayCastInput, int proxyId )
		{
			var proxy = contactManager.broadPhase.getProxy( proxyId );
			var fixture = proxy.fixture;
			int index = proxy.childIndex;
			RayCastOutput output;
			bool hit = fixture.rayCast( out output, ref rayCastInput, index );

			if( hit )
			{
				var fraction = output.Fraction;
				var point = ( 1.0f - fraction ) * rayCastInput.Point1 + fraction * rayCastInput.Point2;
				return _rayCastCallback( fixture, point, output.Normal, fraction );
			}

			return rayCastInput.MaxFraction;
		}