ViewportΒΆ
-
struct
Viewport: System.ValueType Describes the view bounds for render-target surface.
-
int
Height The height of the bounds in pixels.
-
float
MaxDepth The upper limit of depth of this viewport.
-
float
MinDepth The lower limit of depth of this viewport.
-
int
Width The width of the bounds in pixels.
-
int
Y The y coordinate of the beginning of this viewport.
-
int
X The x coordinate of the beginning of this viewport.
-
readonly float
AspectRatio Gets the aspect ratio of this T:Microsoft.Xna.Framework.Graphics.Viewport, which is width / height.
-
Rectangle
Bounds Gets or sets a boundary of this T:Microsoft.Xna.Framework.Graphics.Viewport.
-
readonly Rectangle
TitleSafeArea Returns the subset of the viewport that is guaranteed to be visible on a lower quality display.
-
Vector3
Project(Vector3 source, Matrix projection, Matrix view, Matrix world) Projects a T:Microsoft.Xna.Framework.Vector3 from world space into screen space.
Parameters: - source (Microsoft.Xna.Framework.Vector3) – The T:Microsoft.Xna.Framework.Vector3 to project.
- projection (Microsoft.Xna.Framework.Matrix) – The projection T:Microsoft.Xna.Framework.Matrix.
- view (Microsoft.Xna.Framework.Matrix) – The view T:Microsoft.Xna.Framework.Matrix.
- world (Microsoft.Xna.Framework.Matrix) – The world T:Microsoft.Xna.Framework.Matrix.
Returns:
-
Vector3
Unproject(Vector3 source, Matrix projection, Matrix view, Matrix world) Unprojects a T:Microsoft.Xna.Framework.Vector3 from screen space into world space.
Parameters: - source (Microsoft.Xna.Framework.Vector3) – The T:Microsoft.Xna.Framework.Vector3 to unproject.
- projection (Microsoft.Xna.Framework.Matrix) – The projection T:Microsoft.Xna.Framework.Matrix.
- view (Microsoft.Xna.Framework.Matrix) – The view T:Microsoft.Xna.Framework.Matrix.
- world (Microsoft.Xna.Framework.Matrix) – The world T:Microsoft.Xna.Framework.Matrix.
Returns:
-
string
ToString() Returns a T:System.String representation of this T:Microsoft.Xna.Framework.Graphics.Viewport in the format: {X:[P:Microsoft.Xna.Framework.Graphics.Viewport.X] Y:[P:Microsoft.Xna.Framework.Graphics.Viewport.Y] Width:[P:Microsoft.Xna.Framework.Graphics.Viewport.Width] Height:[P:Microsoft.Xna.Framework.Graphics.Viewport.Height] MinDepth:[P:Microsoft.Xna.Framework.Graphics.Viewport.MinDepth] MaxDepth:[P:Microsoft.Xna.Framework.Graphics.Viewport.MaxDepth]}
Returns: A T:System.String representation of this T:Microsoft.Xna.Framework.Graphics.Viewport.
-
int