Hololens/Lib/Collisions.cs
//###################################################################################################################
/// <summary>
/// Asynchronous method for calling ray hit test.
/// The result are returned using a RayHitEvent to call overridable method RayHitPositionReceived.
/// </summary>
/// <param name="camera"> the camera where the hit test start, UrhoSharp CullingCamera recommanded </param>
/// <param name="x"> ray position on x axis from left up corner of camera view, normalised value </param>
/// <param name="y"> ray position on y axis from left up corner of camera view, normalised value </param>
Asynchronous method for calling ray hit test.
The result are returned using a RayHitEvent to call overridable method RayHitPositionReceived.
Asynchronous method for calling ray hit test . The result are returned using a RayHitEvent to call overridable method RayHitPositionReceived .
public void RayHitPositionAsync(Camera camera, float x, float y)
        {
            Urho.Application.InvokeOnMain(() =>
            {
                var vector = RayHitPosition(camera, x, y);
                RayHitPositionReceived?.Invoke(vector.X, vector.Y, vector.Z);
            });
        }
public void RayHitPositionAsync ( Camera camera , float x , float y ) { Urho . Application . InvokeOnMain ( ( ) => { var vector = RayHitPosition ( camera , x , y ) ; RayHitPositionReceived ? . Invoke ( vector . X , vector . Y , vector . Z ) ; } ) ; }
Asynchronous method for calling ray hit test.
Asynchronous method for calling ray hit test .
// to avoid multiple i/o conflict due to asychronous call, use the application dispatcher
camera
Camera
the camera where the hit test start, UrhoSharp CullingCamera recommanded
the camera where the hit test start UrhoSharp CullingCamera recommanded
x
float
ray position on x axis from left up corner of camera view, normalised value
ray position on x axis from left up corner of camera view normalised value
y
float
ray position on y axis from left up corner of camera view, normalised value
ray position on y axis from left up corner of camera view normalised value