26 #ifndef __SYNFIG_TIMEGATHER_H
27 #define __SYNFIG_TIMEGATHER_H
30 #include <synfig/valuenodes/valuenode_animated.h>
31 #include <synfig/valuenodes/valuenode_dynamiclist.h>
32 #include <synfig/time.h>
65 bool operator()(
const synfig::Activepoint &lhs,
const synfig::Activepoint &rhs)
const
67 return lhs.time < rhs.time;
75 typedef std::set<synfig::Activepoint,actcmp>
set;
103 template <
typename I1,
typename I2 >
104 bool check_intersect(I1 b1, I1 end1, I2 b2, I2 end2, synfig::Time time_offset = 0, synfig::Real time_dilation = 1)
106 if(b1 == end1 || b2 == end2)
109 for(; b1 != end1 && b2 != end2;)
111 if(*b1 < *b2 * time_dilation + time_offset) ++b1;
112 else if(*b2 * time_dilation + time_offset < *b1) ++b2;
115 assert(*b1 == *b2 * time_dilation + time_offset);
123 bool get_closest_time(
const synfig::Node::time_set &tset,
const synfig::Time &t,
124 const synfig::Time &range, synfig::Time &out);
129 timepoints_ref &vals, synfig::Time time = 0, synfig::Real time_dilation = 1);
131 timepoints_ref &vals, synfig::Time time = 0, synfig::Real time_dilation = 1);
133 timepoints_ref &vals, synfig::Time time = 0, synfig::Real time_dilation = 1);