| 108 | } |
| 109 | |
| 110 | H4 ProjectOntoH4(const Float3& dir) |
| 111 | { |
| 112 | H4 result; |
| 113 | |
| 114 | result[0] = (1.0f / std::sqrt(2.0f * 3.14159f)); |
| 115 | |
| 116 | // Band 1 |
| 117 | result[1] = std::sqrt(1.5f / 3.14159f) * dir.y; |
| 118 | result[2] = std::sqrt(1.5f / 3.14159f) * (2 * dir.z - 1.0f); |
| 119 | result[3] = std::sqrt(1.5f / 3.14159f) * dir.x; |
| 120 | |
| 121 | return result; |
| 122 | } |
| 123 | |
| 124 | H4Color ProjectOntoH4Color(const Float3& dir, const Float3& color) |
| 125 | { |
no test coverage detected