Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
SiliconStudio.Paradox.Graphics.Viewport Struct Reference

Defines the window dimensions of a render-target surface onto which a 3D volume projects. More...

Inheritance diagram for SiliconStudio.Paradox.Graphics.Viewport:
IEquatable< Viewport >

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...
 

Detailed Description

Defines the window dimensions of a render-target surface onto which a 3D volume projects.

Definition at line 14 of file Viewport.cs.

Constructor & Destructor Documentation

SiliconStudio.Paradox.Graphics.Viewport.Viewport ( int  x,
int  y,
int  width,
int  height 
)

Creates an instance of this object.

Parameters
xThe x coordinate of the upper-left corner of the viewport in pixels.
yThe y coordinate of the upper-left corner of the viewport in pixels.
widthThe width of the viewport in pixels.
heightThe 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.

Parameters
boundsA bounding box that defines the location and size of the viewport in a render target.

Definition at line 58 of file Viewport.cs.

Member Function Documentation

bool SiliconStudio.Paradox.Graphics.Viewport.Equals ( Viewport  other)
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 bool SiliconStudio.Paradox.Graphics.Viewport.operator!= ( Viewport  left,
Viewport  right 
)
static

Definition at line 112 of file Viewport.cs.

static bool SiliconStudio.Paradox.Graphics.Viewport.operator== ( Viewport  left,
Viewport  right 
)
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.

Parameters
sourceThe vector to project.
projectionThe projection matrix.
viewThe view matrix.
worldThe 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.

Parameters
sourceThe vector to project.
projectionThe projection matrix.
viewThe view matrix.
worldThe 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.

Member Data Documentation

readonly Viewport SiliconStudio.Paradox.Graphics.Viewport.Empty
static
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().

Property Documentation

float SiliconStudio.Paradox.Graphics.Viewport.AspectRatio
get

Gets the aspect ratio used by the viewport

Definition at line 171 of file Viewport.cs.

Rectangle SiliconStudio.Paradox.Graphics.Viewport.Bounds
getset

Gets the size of this resource.

Definition at line 70 of file Viewport.cs.


The documentation for this struct was generated from the following file: