| GraphicsHelperProject Method (Viewport, Vector3F, Matrix44F) |
Projects a position from world space into screen space.
Namespace: DigitalRune.GraphicsAssembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax public static Vector3F Project(
this Viewport viewport,
Vector3F position,
Matrix44F projection
)
<ExtensionAttribute>
Public Shared Function Project (
viewport As Viewport,
position As Vector3F,
projection As Matrix44F
) As Vector3F
public:
[ExtensionAttribute]
static Vector3F Project(
Viewport viewport,
Vector3F position,
Matrix44F projection
)
[<ExtensionAttribute>]
static member Project :
viewport : Viewport *
position : Vector3F *
projection : Matrix44F -> Vector3F
Parameters
- viewport
- Type: Viewport
The viewport. - position
- Type: DigitalRune.Mathematics.AlgebraVector3F
The position in view space. - projection
- Type: DigitalRune.Mathematics.AlgebraMatrix44F
The projection matrix.
Return Value
Type:
Vector3F
The position in screen space: The x- and y-components define the pixel position. The
z-component defines the depth in clip space mapped to the range
[
MinDepth,
MaxDepth] (usually [0, 1]).
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