Returns ray which is reflected from the interface.
(self, ray, geometry, container, adjacent)
| 240 | return gamma < r |
| 241 | |
| 242 | def reflect(self, ray, geometry, container, adjacent): |
| 243 | """ Returns ray which is reflected from the interface. |
| 244 | """ |
| 245 | direction = self.delegate.reflected_direction( |
| 246 | self, ray, geometry, container, adjacent |
| 247 | ) |
| 248 | if not isinstance(direction, tuple): |
| 249 | raise ValueError( |
| 250 | "Delegate method `reflected_direction` should return a tuple." |
| 251 | ) |
| 252 | if len(direction) != 3: |
| 253 | raise ValueError( |
| 254 | "Delegate method `reflected_direction` should return a tuple of length 3." |
| 255 | ) |
| 256 | return replace(ray, direction=direction) |
| 257 | |
| 258 | def transmit(self, ray, geometry, container, adjacent): |
| 259 | """ Returns ray which is transmitted from the interface. |
no test coverage detected