MayaFlux 0.4.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 386 of file RegionUtils.cpp.

387{
388 for (size_t i = 0; i < regions.size(); ++i) {
389 if (regions[i].contains_position(position)) {
390 return i;
391 }
392 }
393 return std::nullopt;
394}
glm::vec3 position

References position.