A new method for predicting the solar heat gain of complex fenestration systems: II, Detailed description of the matrix layer calculation