/// <summary> /// Sets the actively selected matrix in the <see cref="InputsViewModel"/> to the given matrix /// </summary> /// <param name="mat"></param> public void SetMatrixAsSelected(Matrix4ViewModel mat) { if (Inputs.IsMatrixSelected) { Inputs.SelectedMatrix.Set(mat.GetMatrix()); } }
/// <summary> /// Sets a given matrix to the actively selected matrix in the <see cref="InputsViewModel"/> /// </summary> /// <param name="mat"></param> public void SetMatrixFromSelected(Matrix4ViewModel mat) { if (Inputs.IsMatrixSelected) { mat.Set(Inputs.SelectedMatrix.GetMatrix()); } }
public MatrixCalculationsViewModel() { DotProductInput1 = new Matrix4ViewModel(); DotProductInput2 = new Matrix4ViewModel(); DotProductOutput = new Matrix4ViewModel(); RotationMatrixInput = new Matrix4ViewModel(); RotationXInput = new Vector3ViewModel(); RotationYInput = new Vector3ViewModel(); RotationZInput = new Vector3ViewModel(); RotationMatrixOutput = new Matrix4ViewModel(); CalculateDotProductCommand = new Command(CalculateDotProduct); CalculateRotationCommand = new CommandParam <string>(CalculateRotation); }
public static Matrix4ViewModel RotateZ(Matrix4ViewModel a, Vector3ViewModel b) { Matrix4 rot = a.GetMatrix() * Matrix4.RotateZ(b.Z); return(new Matrix4ViewModel(rot)); }
public static Matrix4ViewModel MultiplyMatrixByMatrix(Matrix4ViewModel a, Matrix4ViewModel m) { return(new Matrix4ViewModel(a.GetMatrix() * m.GetMatrix())); }