C# Класс Microsoft.Xna.Framework.Graphics.Viewport

Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
WithinEpsilon bool

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
WithinEpsilon ( float a, float b ) : bool

Описание методов

Project() публичный Метод

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 .
Результат System.Vector3

ToString() публичный Метод

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
Результат string

Unproject() публичный Метод

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 .
Результат System.Vector3

Viewport() публичный Метод

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.
Результат System

Viewport() публичный Метод

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.
Результат System

Viewport() публичный Метод

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.
Результат System