Further details on how to compute matrix from quaternion:
http://renderfeather.googlecode.com/hg-history/034a1900d6e8b6c92440382658d2b01fc732c5de/Doc/optimized%2520Matrix%2520quaternion%2520conversion.pdf
View code on GitHub Namespace: DeltaEngine.DatatypesAssembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
public static Matrix FromQuaternion(
Quaternion quaternion
)
public static Matrix FromQuaternion(
Quaternion quaternion
)
Public Shared Function FromQuaternion (
quaternion As Quaternion
) As Matrix
Public Shared Function FromQuaternion (
quaternion As Quaternion
) As Matrix
public:
static Matrix FromQuaternion(
Quaternion quaternion
)
public:
static Matrix FromQuaternion(
Quaternion quaternion
)
static member FromQuaternion :
quaternion : Quaternion -> Matrix
static member FromQuaternion :
quaternion : Quaternion -> Matrix
Return Value
Type:
MatrixTests:
DeltaEngine.Tests.Datatypes.MatrixTests1 unit tests call DeltaEngine.Datatypes.Matrix.FromQuaternion(DeltaEngine.Datatypes.Quaternion)
[Test]
public void FromQuaternion()
{
var quaternion = Quaternion.FromAxisAngle(Vector3D.UnitY, 60.0f);
matrix = Matrix.CreateRotationY(60.0f);
Assert.AreEqual(matrix, Matrix.FromQuaternion(quaternion));
}
[Test]
public void FromQuaternion()
{
var quaternion = Quaternion.FromAxisAngle(Vector3D.UnitY, 60.0f);
matrix = Matrix.CreateRotationY(60.0f);
Assert.AreEqual(matrix, Matrix.FromQuaternion(quaternion));
}