differt.scene.AbstractPathLauncher#
- class AbstractPathLauncher[source]#
Bases:
AbstractPathSolverAbstract base class for ray-launching path solvers.
Subclasses must implement
launch_raysand may overridebounce_raysandfilter_rays.The main entry point is
launch_paths, which orchestrates ray launching, bouncing, filtering, and assembly; analogous toAbstractPathTracer.trace_paths.Attributes
Maximal (squared) distance between a receiver and a ray.
Tolerance for checking ray / object intersections.
Tolerance for blockage checks.
Methods
bounce_rays(scene, ray_origins, ...)Apply ray bouncing strategies to update ray states.
filter_rays(scene, ray_origins, ...)Filter rays by some criteria around receiver positions.
launch_paths(scene, order)Launch paths for the given scene and order.
launch_rays(scene)Launch rays from transmitters.
Detailed documentation
- bounce_rays(scene, ray_origins, ray_directions, triangles, t_hit, valid_rays)[source]#
Apply ray bouncing strategies to update ray states.
- Parameters:
scene (
TriangleScene) – The scene.ray_origins (
Float[Array, 'num_tx num_rays 3']) – The current ray origins.ray_directions (
Float[Array, 'num_tx num_rays 3']) – The current ray directions.triangles (
Int[Array, 'num_tx num_rays']) – The hit triangles.t_hit (
Float[Array, 'num_tx num_rays']) – The distance to hit.valid_rays (
Bool[Array, 'num_tx num_rays']) – The boolean mask indicating valid rays.
- Return type:
tuple[Float[Array, 'num_tx num_rays 3'],Float[Array, 'num_tx num_rays 3'],Bool[Array, 'num_tx num_rays']]- Returns:
A tuple of updated ray origins, updated ray directions, and updated valid mask.
- filter_rays(scene, ray_origins, ray_directions, rx_vertices, t_hit, valid_rays)[source]#
Filter rays by some criteria around receiver positions.
- Parameters:
scene (
TriangleScene) – The scene.ray_origins (
Float[Array, 'num_tx num_rays 3']) – The ray origins at start of bounce segment.ray_directions (
Float[Array, 'num_tx num_rays 3']) – The ray directions.rx_vertices (
Float[Array, 'num_rx 3']) – The receiver positions.t_hit (
Float[Array, 'num_tx num_rays']) – The distance to hit (end of bounce segment).valid_rays (
Bool[Array, 'num_tx num_rays']) – The boolean mask indicating valid rays.
- Return type:
- Returns:
A boolean mask indicating which rays pass near which receivers.
- launch_paths(scene, order)[source]#
Launch paths for the given scene and order.
Orchestrates
launch_rays,bounce_rays, andfilter_raysinto a completeLaunchedPathsresult.- Parameters:
scene (
TriangleScene) – The scene.order (
int) – The maximum path order (number of bounces).
- Return type:
- Returns:
The launched paths.
- abstractmethod launch_rays(scene)[source]#
Launch rays from transmitters.
- Parameters:
scene (
TriangleScene) – The scene.- Return type:
tuple[Float[Array, 'num_tx num_rays 3'],Float[Array, 'num_tx num_rays 3']]- Returns:
A tuple of ray origins and ray directions.