using Robust.Client.UserInterface.CustomControls; using Robust.Shared.Map; using Robust.Shared.Maths; namespace Robust.Client.Graphics { /// /// Keeps a reference to the current eye (camera) that the client is seeing though, and provides /// utility functions for the current eye. /// public interface IEyeManager { /// /// The current eye that is being used to render the game. /// /// /// Setting this property to null will use the default eye. /// IEye CurrentEye { get; set; } IViewportControl MainViewport { get; set; } /// /// The ID of the map on which the current eye is "placed". /// MapId CurrentMap { get; } /// /// A world-space box that is at LEAST the area covered by the viewport. /// May be larger due to say rotation. /// Box2 GetWorldViewport(); Box2Rotated GetWorldViewbounds(); /// /// Calculates the projection matrix to transform a point from camera space /// to UI screen space. /// /// void GetScreenProjectionMatrix(out Matrix3 projMatrix); /// /// Projects a point from world space to UI screen space using the current camera. /// /// Point in world to transform. /// Corresponding point in UI screen space. Vector2 WorldToScreen(Vector2 point); /// /// Projects a point from world space to UI screen space using the current camera. /// /// Point in world to transform. /// Corresponding point in UI screen space. ScreenCoordinates CoordinatesToScreen(EntityCoordinates point); ScreenCoordinates MapToScreen(MapCoordinates point); /// /// Unprojects a point from UI screen space to world space using the viewport under the screen coordinates. /// /// /// The game exists on the 2D X/Y plane, so this function returns a point o the plane /// instead of a line segment. /// /// Point on screen to transform. /// Corresponding point in the world. MapCoordinates ScreenToMap(ScreenCoordinates point); /// /// Unprojects a point from UI screen space to world space using the main viewport. /// /// /// The game exists on the 2D X/Y plane, so this function returns a point o the plane /// instead of a line segment. /// /// Point on screen to transform. /// Corresponding point in the world. MapCoordinates ScreenToMap(Vector2 point); void ClearCurrentEye(); void Initialize(); } }