mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-25 02:46:55 +00:00
Implemented Matrix3(d) constructor that takes upper-left 3x3 of a Matrix4(d) as discussed in the following issue: https://github.com/andykorth/opentk/issues/4
This commit is contained in:
parent
31ba0a36b9
commit
94c7ad4f58
|
@ -100,6 +100,17 @@ namespace OpenTK
|
|||
Row2 = new Vector3(m20, m21, m22);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new instnace.
|
||||
/// </summary>
|
||||
/// <param name="matrix">A Matrix4 to take the upper-left 3x3 from.</param>
|
||||
public Matrix3(Matrix4 matrix)
|
||||
{
|
||||
Row0 = matrix.Row0.Xyz;
|
||||
Row1 = matrix.Row1.Xyz;
|
||||
Row2 = matrix.Row2.Xyz;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Members
|
||||
|
|
|
@ -95,6 +95,17 @@ namespace OpenTK
|
|||
Row2 = new Vector3d(m20, m21, m22);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new instance.
|
||||
/// </summary>
|
||||
/// <param name="matrix">A Matrix4d to take the upper-left 3x3 from.</param>
|
||||
public Matrix3d(Matrix4d matrix)
|
||||
{
|
||||
Row0 = matrix.Row0.Xyz;
|
||||
Row1 = matrix.Row1.Xyz;
|
||||
Row2 = matrix.Row2.Xyz;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Members
|
||||
|
|
Loading…
Reference in a new issue