![]() |
![]() |
![]() |
Matrix.PerspectiveRH Method |
Language: |
Builds a right-handed perspective projection matrix.
Visual Basic .NET Public Shared Function PerspectiveRH( _
ByVal width As Single, _
ByVal height As Single, _
ByVal znearPlane As Single, _
ByVal zfarPlane As Single _
) As MatrixC# public static Matrix PerspectiveRH(
float width,
float height,
float znearPlane,
float zfarPlane
);Managed C++ public: static Matrix PerspectiveRH(
float width,
float height,
float znearPlane,
float zfarPlane
);JScript .NET public static function PerspectiveRH(
width : float,
height : float,
znearPlane : float,
zfarPlane : float
) : Matrix;
width System.Single. Width of the view volume at the near view plane. height System.Single. Height of the view volume at the near view plane. znearPlane System.Single. Z-value of the near view plane. zfarPlane System.Single. Z-value of the far view plane.
Microsoft.DirectX.Matrix . Pointer to a Matrix structure that is a right-handed perspective projection matrix.
All of the parameters of the PerspectiveRH method are distances in camera space. The parameters describe the dimensions of the view volume.
This method uses the following formula to compute the returned matrix.
2*znearPlane/width 0 0 0 0 2*znearPlane/height 0 0 0 0 zfarPlane/(znearPlane-zfarPlane) -1 0 0 znearPlane*zfarPlane/(znearPlane-zfarPlane) 0
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center