Dela via


Matrix.CreateWorld Method (Vector3, Vector3, Vector3, Matrix)

Creates a world matrix with the specified parameters.

Syntax

'Declaration
Public Shared Sub CreateWorld ( _
         ref position As Vector3, _
         ref forward As Vector3, _
         ref up As Vector3, _
         out result As Matrix _
)
public static void CreateWorld (
         ref Vector3 position,
         ref Vector3 forward,
         ref Vector3 up,
         out Matrix result
)
public:
static void CreateWorld(
         ref Vector3 position,
         ref Vector3 forward,
         ref Vector3 up,
         out Matrix result
)

Parameters

  • position
    Type: Vector3
    Position of the object. This value is used in translation operations.
  • forward
    Type: Vector3
    Forward direction of the object.
  • up
    Type: Vector3
    Upward direction of the object; usually [0, 1, 0].
  • result
    Type: Matrix
    [OutAttribute] The created world matrix.

Remarks

This matrix includes rotation and translation, but not scaling.

Requirements

Namespace: Microsoft.Xna.Framework

Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

See Also

Reference

Matrix Structure
CreateScale
Matrix Members
Microsoft.Xna.Framework Namespace

Platforms

Windows Phone