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

◆ contains_position()

bool MayaFlux::Kakshya::RegionSegment::contains_position ( const std::vector< uint64_t > &  pos) const
inline

Check if a position is within this segment.

Parameters
posThe N-dimensional position.
Returns
True if contained, false otherwise.

Definition at line 105 of file RegionSegment.hpp.

106 {
107 if (pos.size() != offset_in_region.size())
108 return false;
109
110 for (size_t i = 0; i < pos.size(); ++i) {
111 if (pos[i] < offset_in_region[i] || pos[i] >= offset_in_region[i] + segment_size[i]) {
112 return false;
113 }
114 }
115 return true;
116 }
std::vector< uint64_t > offset_in_region
Offset within the source region.
std::vector< uint64_t > segment_size
Size in each dimension.

Referenced by MayaFlux::Kakshya::OrganizedRegion::contains_position().

+ Here is the caller graph for this function: