/* PhBMixedSpectrum.C: PhBMixedSpectrum nodes (public source) */

#include "PhBMixedSpectrum.H"

namespace xrml {

void PhBMixedSpectrum::render(void)
{
  value = Spectrum(0.);
  for (int i=0; i<spectra.size; i++) {
    float w = (i<weight.size) ? (float)weight[i] : 1.;
    spectra[i]->render();
    value += spectra[i]->value * w;
  }
}

}  // namespace xrml
