version 0.6.0
Loading...
Searching...
No Matches
mod_ray_tracing::t_intersection_list Type Reference

Sorted list of intersections. More...

Public Member Functions

procedure clear (intersection_list)
 Reset intersection list.
 
procedure push (intersection_list, intersection)
 Add an intersection to the list.
 

Public Attributes

type(t_intersection), dimension(:), allocatable intersection
 List of intersections.
 
integer n_intersections = 0
 Number of intersection.
 

Detailed Description

Intersections are sorted by distance.

Member Function/Subroutine Documentation

◆ clear()

procedure mod_ray_tracing::t_intersection_list::clear ( class(t_intersection_list), intent(inout) intersection_list)

Do not deallocate the list, just reset the number of intersections to zero.

Parameters
[in,out]intersection_listList of intersections.

◆ push()

procedure mod_ray_tracing::t_intersection_list::push ( class(t_intersection_list), intent(inout) intersection_list,
type(t_intersection), intent(in) intersection )

If the distance of the intersection to push is greater than the last item of the list, no insertion is required, this implies better performances.

Whenever it is possible, prefer to insert the intersections in a sorted order.

Parameters
[in,out]intersection_listList of intersections.
[in]intersectionIntersection.

The documentation for this type was generated from the following file: