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

◆ get_temporal_position()

template<typename T >
double MayaFlux::Yantra::get_temporal_position ( const T &  item)

Helper function to get temporal position from various types Used by TemporalSortable concept.

Definition at line 182 of file SortingHelper.hpp.

183{
184 if constexpr (requires { item.start_coordinates; }) {
185 return !item.start_coordinates.empty() ? static_cast<double>(item.start_coordinates[0]) : 0.0;
186 } else if constexpr (requires { item.timestamp; }) {
187 return static_cast<double>(item.timestamp);
188 } else if constexpr (requires { item.time; }) {
189 return static_cast<double>(item.time);
190 } else {
191 static_assert(std::is_same_v<T, void>, "Type does not have temporal information");
192 return 0.0;
193 }
194}

Referenced by create_universal_sort_key().

+ Here is the caller graph for this function: