Axiom.Core.Camera.GetCameraToViewportRay C# (CSharp) Method

GetCameraToViewportRay() private method

private GetCameraToViewportRay ( float screenX, float screenY ) : Ray
screenX float
screenY float
return Axiom.Math.Ray
        public Ray GetCameraToViewportRay(float screenX, float screenY)
        {
            Ray ret;
            GetCameraToViewportRay(screenX, screenY, out ret);
            return ret;
        }

Same methods

Camera::GetCameraToViewportRay ( float screenX, float screenY, Ray &ray ) : void

Usage Example

Beispiel #1
0
		/// <summary>
		/// Converts a 2D screen coordinate (in pixels) to a 3D ray into the scene.
		/// </summary>
		/// <param name="cam"></param>
		/// <param name="pt"></param>
		/// <returns></returns>
		public static Ray ScreenToScene( Camera cam, Vector2 pt )
		{
			return cam.GetCameraToViewportRay( pt.x, pt.y );
		}