Click or drag to resize
DigitalRuneGraphicsHelperUnproject Method (Viewport, Vector3F, Matrix44F, Matrix44F)
Projects a position from screen space into world space.

Namespace: DigitalRune.Graphics
Assembly: 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
)

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: Vector3F
The 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