Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
CreatePerspectiveOffCenter Method (Single, Single, Single, Single, Single, Single)

Matrix.CreatePerspectiveOffCenter Method (Single, Single, Single, Single, Single, Single)

Builds a customized, perspective projection matrix.

Namespace:  Microsoft.Xna.Framework
Assembly:  Microsoft.Xna.Framework.Math (in Microsoft.Xna.Framework.Math.dll)

public static Matrix CreatePerspectiveOffCenter(
	float left,
	float right,
	float bottom,
	float top,
	float nearPlaneDistance,
	float farPlaneDistance


Type: System.Single
Minimum x-value of the view volume at the near view plane.
Type: System.Single
Maximum x-value of the view volume at the near view plane.
Type: System.Single
Minimum y-value of the view volume at the near view plane.
Type: System.Single
Maximum y-value of the view volume at the near view plane.
Type: System.Single
Distance to the near view plane.
Type: System.Single
Distance to of the far view plane.

Return Value

Type: Microsoft.Xna.Framework.Matrix
The created projection matrix.


One of the following conditions is true:

  1. nearPlaneDistance or farPlaneDistance is a negative value. Specify a positive value for nearPlaneDistance or farPlaneDistance.

  2. nearPlaneDistance larger than farPlaneDistance. nearPlaneDistance must be smaller than farPlaneDistance.

Projection space refers to the space after applying projection transformation from view space. After the projection transformation, visible content has x and y-coordinates ranging from −1 to 1, and a z-coordinate ranging from 0 to 1.

To obtain the viewable area (in world space) of a scene, create a BoundingFrustum and pass the combined view and projection matrix to the constructor.


Supported in: 5

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

© 2015 Microsoft