MayaFlux 0.1.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 388 of file SortingHelper.hpp.

389{
390 if constexpr (requires { item.start_coordinates; }) {
391 return !item.start_coordinates.empty() ? static_cast<double>(item.start_coordinates[0]) : 0.0;
392 } else if constexpr (requires { item.timestamp; }) {
393 return static_cast<double>(item.timestamp);
394 } else if constexpr (requires { item.time; }) {
395 return static_cast<double>(item.time);
396 } else {
397 static_assert(std::is_same_v<T, void>, "Type does not have temporal information");
398 return 0.0;
399 }
400}

Referenced by create_universal_sort_key().

+ Here is the caller graph for this function: