Axiom.Samples.SdkTrayManager.sceneToScreen C# (CSharp) Метод

sceneToScreen() публичный статический Метод

Converts a 3D scene position to a 2D screen coordinate (in pixels).
public static sceneToScreen ( Camera cam, Vector3 pt ) : Vector2
cam Axiom.Core.Camera
pt Vector3
Результат Vector2
		public static Vector2 sceneToScreen( Camera cam, Vector3 pt )
		{
			Vector3 result = cam.ProjectionMatrix * cam.ViewMatrix * pt;
			return new Vector2( ( result.x + 1 ) / 2, -( result.y + 1 ) / 2 );
		}