Reference here: https://github.com/kayru/Probulator/blob/master/Source/Probulator/SphericalHarmonics.h#L317
| 18 | // Reference here: |
| 19 | // https://github.com/kayru/Probulator/blob/master/Source/Probulator/SphericalHarmonics.h#L317 |
| 20 | void sh_windowing(spherical_harmonics_t &harmonics, float window_width) { |
| 21 | int i = 0; |
| 22 | for(int band = 0; band <= 2; band++) { |
| 23 | float s = 1.0f / (1.0f + window_width * band * band * (band + 1.0f) * (band + 1.0f)); |
| 24 | for(int m = -band; m <= band; m++) { |
| 25 | harmonics.coefficients[i++] *= s; |
| 26 | } |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | /////////////////////////////////////////// |
| 31 |
no outgoing calls
no test coverage detected