Returns ray which is transmitted from the interface.
(self, ray, geometry, container, adjacent)
| 256 | return replace(ray, direction=direction) |
| 257 | |
| 258 | def transmit(self, ray, geometry, container, adjacent): |
| 259 | """ Returns ray which is transmitted from the interface. |
| 260 | """ |
| 261 | direction = self.delegate.transmitted_direction( |
| 262 | self, ray, geometry, container, adjacent |
| 263 | ) |
| 264 | if not isinstance(direction, tuple): |
| 265 | raise ValueError( |
| 266 | "Delegate method `transmitted_direction` should return a tuple." |
| 267 | ) |
| 268 | if len(direction) != 3: |
| 269 | raise ValueError( |
| 270 | "Delegate method `transmitted_direction` should return a tuple of length 3." |
| 271 | ) |
| 272 | return replace(ray, direction=direction) |
no test coverage detected