Matrix.CreateOrthographic Method (Single, Single, Single, Single)
Builds an orthogonal projection matrix.
Namespace: Microsoft.Xna.Framework
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
Syntax
public static Matrix CreateOrthographic (
float width,
float height,
float zNearPlane,
float zFarPlane
)
Parameters
- width
Width of the view volume. - height
Height of the view volume. - zNearPlane
Minimum z-value of the view volume. - zFarPlane
Maximum z-value of the view volume.
Return Value
The 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 Z coordinate ranging from 0 to 1.
Unlike perspective projection, in orthographic projection there is no perspective foreshortening.
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