public void SetMatrix(string name, MatrixFourByFour value) { if (value == null) { throw new CYFException("shader.SetMatrix: The second argument, the matrix to set, needs to be a Matrix object."); } material.SetMatrix(IndexProperty(name, false), value.self); }
public MatrixFourByFour[] GetMatrixArray(string name) { Matrix4x4[] matrices = material.GetMatrixArray(IndexProperty(name, true)); MatrixFourByFour[] output = new MatrixFourByFour[matrices.Length]; for (int i = 0; i < matrices.Length; i++) { output[i] = new MatrixFourByFour(matrices[i]); } return(output); }