MayaFlux 0.1.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 364 of file RegionUtils.cpp.

365{
366 for (size_t i = 0; i < regions.size(); ++i) {
367 if (regions[i].contains_position(position)) {
368 return i;
369 }
370 }
371 return std::nullopt;
372}

References find_region_for_position().

+ Here is the call graph for this function: