MCPcopy Create free account
hub / github.com/danieljfarrell/pvtrace / transmit

Method transmit

pvtrace/material/surface.py:258–272  ·  view source on GitHub ↗

Returns ray which is transmitted from the interface.

(self, ray, geometry, container, adjacent)

Source from the content-addressed store, hash-verified

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)

Callers 1

followFunction · 0.45

Calls 1

transmitted_directionMethod · 0.45

Tested by

no test coverage detected