![]() |
Paradox Game Engine
v1.0.0 beta06
|
Defines the window dimensions of a render-target surface onto which a 3D volume projects. More...
Public Member Functions | |
Viewport (int x, int y, int width, int height) | |
Creates an instance of this object. More... | |
Viewport (Rectangle bounds) | |
Creates an instance of this object. More... | |
bool | Equals (Viewport other) |
override bool | Equals (object obj) |
override int | GetHashCode () |
override string | ToString () |
Retrieves a string representation of this object. More... | |
Vector3 | Project (Vector3 source, Matrix projection, Matrix view, Matrix world) |
Projects a 3D vector from object space into screen space. More... | |
Vector3 | Unproject (Vector3 source, Matrix projection, Matrix view, Matrix world) |
Converts a screen space point into a corresponding point in world space. More... | |
Static Public Member Functions | |
static bool | operator== (Viewport left, Viewport right) |
static bool | operator!= (Viewport left, Viewport right) |
Public Attributes | |
float | X |
Gets or sets the pixel coordinate of the upper-left corner of the viewport on the render-target surface. More... | |
float | Y |
Gets or sets the pixel coordinate of the upper-left corner of the viewport on the render-target surface. More... | |
float | Width |
Gets or sets the width dimension of the viewport on the render-target surface, in pixels. More... | |
float | Height |
Gets or sets the height dimension of the viewport on the render-target surface, in pixels. More... | |
float | MinDepth |
Gets or sets the minimum depth of the clip volume. More... | |
float | MaxDepth |
Gets or sets the maximum depth of the clip volume. More... | |
Static Public Attributes | |
static readonly Viewport | Empty |
Empty value for an undefined viewport. More... | |
Properties | |
Rectangle | Bounds [get, set] |
Gets the size of this resource. More... | |
float | AspectRatio [get] |
Gets the aspect ratio used by the viewport More... | |
Defines the window dimensions of a render-target surface onto which a 3D volume projects.
Definition at line 14 of file Viewport.cs.
SiliconStudio.Paradox.Graphics.Viewport.Viewport | ( | int | x, |
int | y, | ||
int | width, | ||
int | height | ||
) |
Creates an instance of this object.
x | The x coordinate of the upper-left corner of the viewport in pixels. |
y | The y coordinate of the upper-left corner of the viewport in pixels. |
width | The width of the viewport in pixels. |
height | The height of the viewport in pixels. |
Definition at line 46 of file Viewport.cs.
References DirectX.y.
SiliconStudio.Paradox.Graphics.Viewport.Viewport | ( | Rectangle | bounds | ) |
Creates an instance of this object.
bounds | A bounding box that defines the location and size of the viewport in a render target. |
Definition at line 58 of file Viewport.cs.
bool SiliconStudio.Paradox.Graphics.Viewport.Equals | ( | Viewport | other | ) |
Definition at line 81 of file Viewport.cs.
References SiliconStudio.Paradox.Graphics.Viewport.Height, SiliconStudio.Paradox.Graphics.Viewport.MaxDepth, and SiliconStudio.Paradox.Graphics.Viewport.Y.
override bool SiliconStudio.Paradox.Graphics.Viewport.Equals | ( | object | obj | ) |
Definition at line 86 of file Viewport.cs.
override int SiliconStudio.Paradox.Graphics.Viewport.GetHashCode | ( | ) |
Definition at line 93 of file Viewport.cs.
|
static |
Definition at line 112 of file Viewport.cs.
|
static |
Definition at line 107 of file Viewport.cs.
Vector3 SiliconStudio.Paradox.Graphics.Viewport.Project | ( | Vector3 | source, |
Matrix | projection, | ||
Matrix | view, | ||
Matrix | world | ||
) |
Projects a 3D vector from object space into screen space.
source | The vector to project. |
projection | The projection matrix. |
view | The view matrix. |
world | The world matrix. |
Definition at line 134 of file Viewport.cs.
References a, SiliconStudio.Core.Mathematics.Matrix.M24, SiliconStudio.Core.Mathematics.Matrix.M34, SiliconStudio.Core.Mathematics.Matrix.M44, SiliconStudio.Core.Mathematics.Vector4.X, SiliconStudio.Core.Mathematics.Vector4.Y, and SiliconStudio.Core.Mathematics.Vector4.Z.
override string SiliconStudio.Paradox.Graphics.Viewport.ToString | ( | ) |
Retrieves a string representation of this object.
Definition at line 118 of file Viewport.cs.
Vector3 SiliconStudio.Paradox.Graphics.Viewport.Unproject | ( | Vector3 | source, |
Matrix | projection, | ||
Matrix | view, | ||
Matrix | world | ||
) |
Converts a screen space point into a corresponding point in world space.
source | The vector to project. |
projection | The projection matrix. |
view | The view matrix. |
world | The world matrix. |
Definition at line 154 of file Viewport.cs.
References a, SiliconStudio.Core.Mathematics.Matrix.M24, SiliconStudio.Core.Mathematics.Matrix.M34, SiliconStudio.Core.Mathematics.Matrix.M44, SiliconStudio.Core.Mathematics.Vector4.X, SiliconStudio.Core.Mathematics.Vector4.Y, and SiliconStudio.Core.Mathematics.Vector4.Z.
|
static |
Empty value for an undefined viewport.
Definition at line 19 of file Viewport.cs.
Referenced by SiliconStudio.Paradox.Effects.RenderTargetsPlugin.Load(), SiliconStudio.Paradox.Effects.MultipleRenderTargetsSetter.OnRendering(), and SiliconStudio.Paradox.Effects.RenderTargetSetter.OnRendering().
float SiliconStudio.Paradox.Graphics.Viewport.Height |
Gets or sets the height dimension of the viewport on the render-target surface, in pixels.
Definition at line 33 of file Viewport.cs.
Referenced by SiliconStudio.Paradox.Graphics.Viewport.Equals(), SiliconStudio.Paradox.Effects.MultipleRenderTargetsSetter.OnRendering(), and SiliconStudio.Paradox.Effects.RenderTargetSetter.OnRendering().
float SiliconStudio.Paradox.Graphics.Viewport.MaxDepth |
Gets or sets the maximum depth of the clip volume.
Definition at line 39 of file Viewport.cs.
Referenced by SiliconStudio.Paradox.Graphics.Viewport.Equals().
float SiliconStudio.Paradox.Graphics.Viewport.MinDepth |
Gets or sets the minimum depth of the clip volume.
Definition at line 36 of file Viewport.cs.
float SiliconStudio.Paradox.Graphics.Viewport.Width |
Gets or sets the width dimension of the viewport on the render-target surface, in pixels.
Definition at line 30 of file Viewport.cs.
Referenced by SiliconStudio.Paradox.Effects.MultipleRenderTargetsSetter.OnRendering(), and SiliconStudio.Paradox.Effects.RenderTargetSetter.OnRendering().
float SiliconStudio.Paradox.Graphics.Viewport.X |
Gets or sets the pixel coordinate of the upper-left corner of the viewport on the render-target surface.
Definition at line 24 of file Viewport.cs.
float SiliconStudio.Paradox.Graphics.Viewport.Y |
Gets or sets the pixel coordinate of the upper-left corner of the viewport on the render-target surface.
Definition at line 27 of file Viewport.cs.
Referenced by SiliconStudio.Paradox.Graphics.Viewport.Equals().
|
get |
Gets the aspect ratio used by the viewport
Definition at line 171 of file Viewport.cs.
|
getset |
Gets the size of this resource.
Definition at line 70 of file Viewport.cs.