Matrix4.RotateFromEuler

RotateFromEuler(Vector3)

Create a rotation matrix from Euler angle

public static Matrix4 RotateFromEuler(Vector3 eul)
ParameterTypeDescription
eulVector3Rotation in radian

Examples

The following code shows how to create a matrix for rotate operation.

var t = Matrix4.RotateFromEuler(new Vector3(0, Math.PI, 0));
var pos = new Vector3(1, 1, 10);
Console.WriteLine($"Transformed: {t * pos}");

See Also


RotateFromEuler(double, double, double)

Create a rotation matrix from Euler angle

public static Matrix4 RotateFromEuler(double rx, double ry, double rz)
ParameterTypeDescription
rxDoubleRotation in x axis in radian
ryDoubleRotation in y axis in radian
rzDoubleRotation in z axis in radian

Examples

The following code shows how to create a matrix for rotate operation.

var t = Matrix4.RotateFromEuler(0, Math.PI, 0);
var pos = new Vector3(1, 1, 10);
Console.WriteLine($"Transformed: {t * pos}");

See Also