| GraphicsHelperUnproject Method (Viewport, Vector3F, Matrix44F, Matrix44F) |
Projects a position from screen space into world space.
Namespace: DigitalRune.GraphicsAssembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax public static Vector3F Unproject(
this Viewport viewport,
Vector3F position,
Matrix44F projection,
Matrix44F view
)
<ExtensionAttribute>
Public Shared Function Unproject (
viewport As Viewport,
position As Vector3F,
projection As Matrix44F,
view As Matrix44F
) As Vector3F
public:
[ExtensionAttribute]
static Vector3F Unproject(
Viewport viewport,
Vector3F position,
Matrix44F projection,
Matrix44F view
)
[<ExtensionAttribute>]
static member Unproject :
viewport : Viewport *
position : Vector3F *
projection : Matrix44F *
view : Matrix44F -> Vector3F
Parameters
- viewport
- Type: Viewport
The Viewport. - position
- Type: DigitalRune.Mathematics.AlgebraVector3F
The position in screen space: The x- and y-components define the pixel position. The
z-component defines the depth in clip space. (The depth of the clipping volume ranges from
MinDepth to MaxDepth - usually [0, 1].)
- projection
- Type: DigitalRune.Mathematics.AlgebraMatrix44F
The projection matrix. - view
- Type: DigitalRune.Mathematics.AlgebraMatrix44F
The view matrix.
Return Value
Type:
Vector3FThe position in world space.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Viewport. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also