Matrix.CreatePerspectiveOffCenter Method (Single, Single, Single, Single, Single, Single, Matrix%)
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Builds a customized, perspective projection matrix.
Namespace: Microsoft.Xna.Framework
Assembly: Microsoft.Xna.Framework.Math (in Microsoft.Xna.Framework.Math.dll)
Syntax
'Declaration
Public Shared Sub CreatePerspectiveOffCenter ( _
left As Single, _
right As Single, _
bottom As Single, _
top As Single, _
nearPlaneDistance As Single, _
farPlaneDistance As Single, _
<OutAttribute> ByRef result As Matrix _
)
public static void CreatePerspectiveOffCenter(
float left,
float right,
float bottom,
float top,
float nearPlaneDistance,
float farPlaneDistance,
out Matrix result
)
Parameters
- left
Type: System.Single
Minimum x-value of the view volume at the near view plane.
- right
Type: System.Single
Maximum x-value of the view volume at the near view plane.
- bottom
Type: System.Single
Minimum y-value of the view volume at the near view plane.
- top
Type: System.Single
Maximum y-value of the view volume at the near view plane.
- nearPlaneDistance
Type: System.Single
Distance to the near view plane.
- farPlaneDistance
Type: System.Single
Distance to of the far view plane.
- result
Type: Microsoft.Xna.Framework.Matrix%
[OutAttribute] The created projection matrix.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | One of the following conditions is true:
|
Remarks
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.
Version Information
Silverlight
Supported in: 5
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
See Also