| GraphicsHelperProject Method (Viewport, Vector3F, Matrix44F, 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,
Matrix44F view
)
<ExtensionAttribute>
Public Shared Function Project (
viewport As Viewport,
position As Vector3F,
projection As Matrix44F,
view As Matrix44F
) As Vector3F
public:
[ExtensionAttribute]
static Vector3F Project(
Viewport viewport,
Vector3F position,
Matrix44F projection,
Matrix44F view
)
[<ExtensionAttribute>]
static member Project :
viewport : Viewport *
position : Vector3F *
projection : Matrix44F *
view : Matrix44F -> Vector3F
Parameters
- viewport
- Type: Viewport
The viewport. - position
- Type: DigitalRune.Mathematics.AlgebraVector3F
The position in world space. - projection
- Type: DigitalRune.Mathematics.AlgebraMatrix44F
The projection matrix. - view
- Type: DigitalRune.Mathematics.AlgebraMatrix44F
The view 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. (The depth of the clipping volume ranges from
MinDepth to
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