FeatureCatalogue.get_first

giant.relative_opnav.estimators.sfn.surface_features:

static FeatureCatalogue.get_first(total_results, traced_rays)[source]

This static method identifies the first intersection for each ray when there is more than 1 feature intersected.

Each feature in the scene is responsible for identifying the first intersection with itself for each ray. This method is then responsible for identifying which feature was struck first.

This method works by considering the intersection for each ray with each feature, and then finding the the intersection with the minimum distance between the ray and the camera. The result is a 1D array with dtype of INTERSECT_DTYPE.

A user will almost never use this method directly, as it is automatically called by the trace() method.

Parameters:
  • total_results (ndarray) – The first intersection for each ray with each feature in the catalogue

  • traced_rays (Rays) – The rays that these results pertain to

Returns:

The shrunk array specifying the first intersection for each array

Return type:

ndarray