25 #ifndef PXR_BASE_TS_KEY_FRAME_MAP_H
26 #define PXR_BASE_TS_KEY_FRAME_MAP_H
53 typedef std::vector<TsKeyFrame>::iterator
iterator;
95 return _data.rbegin();
100 return _data.rbegin();
120 return _data.max_size();
125 return _data.empty();
140 other._data.swap(_data);
144 void swap(std::vector<TsKeyFrame>& other) {
150 _data.erase(first,last);
160 return (_data == other._data);
165 return (_data != other._data);
183 if (i != _data.end() && i->GetTime() ==
t) {
192 if (i != _data.end() && i->GetTime() ==
t) {
203 if (!
empty() && value.
GetTime() <= _data.back().GetTime()) {
207 return _data.insert(i,value);
210 template <
class Iter>
212 for(Iter i = first; i !=
last; i++) {
220 if (i != _data.end()) {
228 if (i != _data.end() && i->GetTime() ==
t) {
237 std::vector<TsKeyFrame> _data;
TS_API size_t size() const
TS_API void swap(TsKeyFrameMap &other)
TS_API bool empty() const
TS_API void erase(iterator first, iterator last)
std::vector< TsKeyFrame >::const_iterator const_iterator
TS_API TsKeyFrame & operator[](const TsTime &t)
TS_API iterator find(const TsTime &t)
TS_API TsKeyFrameMap(TsKeyFrameMap const &other)
TS_API const_reverse_iterator rend() const
TS_API const_iterator find(const TsTime &t) const
TS_API void reserve(size_t size)
TS_API iterator lower_bound(TsTime t)
TS_API bool operator==(const TsKeyFrameMap &other) const
An ordered sequence of keyframes with STL-compliant API for finding, inserting, and erasing keyframes...
TS_API reverse_iterator rbegin()
std::vector< TsKeyFrame >::iterator iterator
TS_API void SetTime(const TsTime &newTime)
Sets the time of this keyframe.
TS_API void erase(TsTime const &t)
std::vector< TsKeyFrame >::const_reverse_iterator const_reverse_iterator
TS_API TsKeyFrameMap & operator=(TsKeyFrameMap const &other)
TS_API TsTime GetTime() const
Gets the time of this keyframe.
TS_API const_reverse_iterator rbegin() const
TS_API const_iterator begin() const
TS_API void erase(iterator i)
Specifies the value of an TsSpline object at a particular point in time.
PXR_NAMESPACE_OPEN_SCOPE typedef double TsTime
The time type used by Ts.
__hostdev__ uint64_t last(uint32_t i) const
TS_API bool operator!=(const TsKeyFrameMap &other) const
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
TS_API iterator insert(TsKeyFrame const &value)
TS_API reverse_iterator rend()
#define PXR_NAMESPACE_CLOSE_SCOPE
TS_API const_iterator end() const
void insert(Iter const &first, Iter const &last)
TS_API void swap(std::vector< TsKeyFrame > &other)
TS_API size_t max_size() const
TS_API iterator upper_bound(TsTime t)
std::vector< TsKeyFrame >::reverse_iterator reverse_iterator