Export (0) Print
Expand All

Matrix.CreateOrthographicOffCenter Method (Single, Single, Single, Single, Single, Single, Matrix%)

Builds a customized, orthogonal projection matrix.

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

public static void CreateOrthographicOffCenter(
	float left,
	float right,
	float bottom,
	float top,
	float zNearPlane,
	float zFarPlane,
	out Matrix result
)

Parameters

left
Type: System.Single
Minimum x-value of the view volume.
right
Type: System.Single
Maximum x-value of the view volume.
bottom
Type: System.Single
Minimum y-value of the view volume.
top
Type: System.Single
Maximum y-value of the view volume.
zNearPlane
Type: System.Single
Minimum z-value of the view volume.
zFarPlane
Type: System.Single
Maximum z-value of the view volume.
result
Type: Microsoft.Xna.Framework.Matrix%
[OutAttribute] The projection matrix.

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 coordinates ranging from 0 to 1.

Unlike perspective projection, in orthographic projection there is no perspective foreshortening.

The viewable area of this orthographic projection extends from left to right on the x-axis, bottom to top on the y-axis, and zNearPlane to zFarPlane on the z-axis. These values are relative to the position and x, y, and z-axes of the view.

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.

Silverlight

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

ADD
Show:
© 2014 Microsoft