Matrix.CreatePerspectiveOffCenter Method (Single, Single, Single, Single, Single, Single)
Builds a customized, perspective projection matrix.
Namespace: Microsoft.Xna.Framework
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
Syntax
public static Matrix CreatePerspectiveOffCenter (
float left,
float right,
float bottom,
float top,
float nearPlaneDistance,
float farPlaneDistance
)
Parameters
- left
Minimum x-value of the view volume at the near view plane. - right
Maximum x-value of the view volume at the near view plane. - bottom
Minimum y-value of the view volume at the near view plane. - top
Maximum y-value of the view volume at the near view plane. - nearPlaneDistance
Distance to the near view plane. - farPlaneDistance
Distance to of the far view plane.
Return Value
The created projection matrix.
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.
Exceptions
Exception type | Condition |
---|---|
ArgumentOutOfRangeException | One of the following conditions is true:
|
See Also
Tasks
How to: Rotate and Move a Camera
How to: Make a First-Person Camera
How to: Make a Third-Person Camera
Reference
Matrix Structure
Matrix Members
Microsoft.Xna.Framework Namespace
Platforms
Xbox 360, Windows XP SP2, Windows Vista