#include <property_resolver.h>
Definition at line 57 of file property_resolver.h.
◆ ~TimelineResolver()
impeller::scene::TimelineResolver::~TimelineResolver |
( |
| ) |
|
|
virtualdefault |
◆ GetEndTime()
SecondsF impeller::scene::TimelineResolver::GetEndTime |
( |
| ) |
|
|
virtual |
◆ GetTimelineKey()
Definition at line 62 of file property_resolver.cc.
62 {
63 if (
times_.size() <= 1 || time.count() <=
times_.front()) {
64 return {.index = 0, .lerp = 1};
65 }
66 if (time.count() >=
times_.back()) {
67 return {.index =
times_.size() - 1, .lerp = 1};
68 }
69 auto it = std::lower_bound(
times_.begin(),
times_.end(), time.count());
70 size_t index = std::distance(
times_.begin(), it);
71
72 Scalar previous_time = *(it - 1);
74 return {.index = index,
75 .lerp = (time.count() - previous_time) / (next_time - previous_time)};
76}
◆ times_
std::vector<Scalar> impeller::scene::TimelineResolver::times_ |
|
protected |
The documentation for this class was generated from the following files: