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. | |
Sorted list of intersections.
Intersections are sorted by distance.
procedure mod_ray_tracing::t_intersection_list::clear | ( | class(t_intersection_list), intent(inout) | intersection_list | ) |
Reset intersection list.
Do not deallocate the list, just reset the number of intersections to zero.
[in,out] | intersection_list | List of intersections. |
procedure mod_ray_tracing::t_intersection_list::push | ( | class(t_intersection_list), intent(inout) | intersection_list, |
type(t_intersection), intent(in) | intersection ) |
Add an intersection to the list.
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.
[in,out] | intersection_list | List of intersections. |
[in] | intersection | Intersection. |