MayaFlux 0.3.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ find_region_for_position() [2/2]

std::optional< size_t > MayaFlux::Kakshya::find_region_for_position ( const std::vector< uint64_t > &  position,
std::vector< OrganizedRegion regions 
)

Find the index of the region containing the given position.

Parameters
positionN-dimensional coordinates.
regionsvector of OrganizedRegions
Returns
Optional index of the containing region, or std::nullopt if not found.

Definition at line 380 of file RegionUtils.cpp.

381{
382 for (size_t i = 0; i < regions.size(); ++i) {
383 if (regions[i].contains_position(position)) {
384 return i;
385 }
386 }
387 return std::nullopt;
388}

References find_region_for_position().

+ Here is the call graph for this function: