Matrix.LookAtRH Method
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Builds a right-handed look-at matrix.
Namespace: Microsoft.WindowsMobile.DirectX
Assembly: Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)
Syntax
'Declaration
Public Shared Function LookAtRH ( _
cameraPosition As Vector3, _
cameraTarget As Vector3, _
cameraUpVector As Vector3 _
) As Matrix
'Usage
Dim cameraPosition As Vector3
Dim cameraTarget As Vector3
Dim cameraUpVector As Vector3
Dim returnValue As Matrix
returnValue = Matrix.LookAtRH(cameraPosition, _
cameraTarget, cameraUpVector)
public static Matrix LookAtRH(
Vector3 cameraPosition,
Vector3 cameraTarget,
Vector3 cameraUpVector
)
public:
static Matrix LookAtRH(
Vector3 cameraPosition,
Vector3 cameraTarget,
Vector3 cameraUpVector
)
static member LookAtRH :
cameraPosition:Vector3 *
cameraTarget:Vector3 *
cameraUpVector:Vector3 -> Matrix
Parameters
- cameraPosition
Type: Microsoft.WindowsMobile.DirectX.Vector3
A Vector3 structure that defines the camera point. This value is used in translation.
- cameraTarget
Type: Microsoft.WindowsMobile.DirectX.Vector3
A Vector3 structure that defines the camera look-at target.
- cameraUpVector
Type: Microsoft.WindowsMobile.DirectX.Vector3
A Vector3 structure that defines the up direction of the current world, usually [0, 1, 0].
Return Value
Type: Microsoft.WindowsMobile.DirectX.Matrix
A Matrix structure that is a right-handed look-at matrix.
Remarks
This method uses the following formula to compute the returned matrix.
zaxis = normal(cameraPosition - cameraTarget)
xaxis = normal(cross(cameraUpVector, zaxis))
yaxis = cross(zaxis, xaxis)
xaxis.x yaxis.x zaxis.x 0
xaxis.y yaxis.y zaxis.y 0
xaxis.z yaxis.z zaxis.z 0
-dot(xaxis, cameraPosition) -dot(yaxis, cameraPosition) -dot(zaxis, cameraPosition) 1
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Platforms
Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Compact Framework
Supported in: 3.5, 2.0