Share via


Viewport.Project Method

Projects a 3D vector from object space into screen space.

Syntax

'Declaration
Public Function Project ( _
         source As Vector3, _
         projection As Matrix, _
         view As Matrix, _
         world As Matrix _
) As Vector3 
public Vector3 Project (
         Vector3 source,
         Matrix projection,
         Matrix view,
         Matrix world
)
public:
Vector3 Project(
         Vector3 source,
         Matrix projection,
         Matrix view,
         Matrix world
)

Parameters

  • source
    Type: Vector3
    The vector to project.
  • projection
    Type: Matrix
    The projection matrix.
  • view
    Type: Matrix
    The view matrix.
  • world
    Type: Matrix
    The world matrix.

Return Value

Type: Vector3
The vector in screen space.

Requirements

Namespace: Microsoft.Xna.Framework.Graphics

Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)

See Also

Reference

Viewport Structure
Viewport Members
Microsoft.Xna.Framework.Graphics Namespace

Platforms

Windows Phone