C# Class Microsoft.Xna.Framework.Graphics.Viewport

Afficher le fichier Open project: procfxgen/MGShaderEditor Class Usage Examples

Private Properties

Свойство Type Description
WithinEpsilon bool

Méthodes publiques

Méthode Description
Project ( System.Vector3 source, System.Matrix projection, System.Matrix view, System.Matrix world ) : System.Vector3

Projects a Vector3 from world space into screen space.

ToString ( ) : string

Returns a String representation of this Viewport in the format: {X:[X] Y:[Y] Width:[Width] Height:[Height] MinDepth:[MinDepth] MaxDepth:[MaxDepth]}

Unproject ( System.Vector3 source, System.Matrix projection, System.Matrix view, System.Matrix world ) : System.Vector3

Unprojects a Vector3 from screen space into world space.

Viewport ( Rectangle bounds ) : System

Creates a new instance of Viewport struct.

Viewport ( int x, int y, int width, int height ) : System

Constructs a viewport from the given values. The MinDepth will be 0.0 and MaxDepth will be 1.0.

Viewport ( int x, int y, int width, int height, float minDepth, float maxDepth ) : System

Constructs a viewport from the given values.

Private Methods

Méthode Description
WithinEpsilon ( float a, float b ) : bool

Method Details

Project() public méthode

Projects a Vector3 from world space into screen space.
public Project ( System.Vector3 source, System.Matrix projection, System.Matrix view, System.Matrix world ) : System.Vector3
source System.Vector3 The to project.
projection System.Matrix The projection .
view System.Matrix The view .
world System.Matrix The world .
Résultat System.Vector3

ToString() public méthode

Returns a String representation of this Viewport in the format: {X:[X] Y:[Y] Width:[Width] Height:[Height] MinDepth:[MinDepth] MaxDepth:[MaxDepth]}
public ToString ( ) : string
Résultat string

Unproject() public méthode

Unprojects a Vector3 from screen space into world space.
public Unproject ( System.Vector3 source, System.Matrix projection, System.Matrix view, System.Matrix world ) : System.Vector3
source System.Vector3 The to unproject.
projection System.Matrix The projection .
view System.Matrix The view .
world System.Matrix The world .
Résultat System.Vector3

Viewport() public méthode

Creates a new instance of Viewport struct.
public Viewport ( Rectangle bounds ) : System
bounds Rectangle A that defines the location and size of the in a render target.
Résultat System

Viewport() public méthode

Constructs a viewport from the given values. The MinDepth will be 0.0 and MaxDepth will be 1.0.
public Viewport ( int x, int y, int width, int height ) : System
x int The x coordinate of the upper-left corner of the view bounds in pixels.
y int The y coordinate of the upper-left corner of the view bounds in pixels.
width int The width of the view bounds in pixels.
height int The height of the view bounds in pixels.
Résultat System

Viewport() public méthode

Constructs a viewport from the given values.
public Viewport ( int x, int y, int width, int height, float minDepth, float maxDepth ) : System
x int The x coordinate of the upper-left corner of the view bounds in pixels.
y int The y coordinate of the upper-left corner of the view bounds in pixels.
width int The width of the view bounds in pixels.
height int The height of the view bounds in pixels.
minDepth float The lower limit of depth.
maxDepth float The upper limit of depth.
Résultat System