Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
    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);
    }