1#ifndef _ANIMATIONCLIP_HPP_
2#define _ANIMATIONCLIP_HPP_
9#include <unordered_map>
46 auto it = m_channelLookup.find(boneName);
47 return (it != m_channelLookup.end()) ? &
channels[it->second] :
nullptr;
52 m_channelLookup.clear();
53 for (
size_t i = 0; i <
channels.size(); ++i) {
54 m_channelLookup[
channels[i].boneName] =
static_cast<int>(i);
59 std::unordered_map<std::string, int> m_channelLookup;
const AnimationChannel * FindChannel(const std::string &boneName) const
O(1) channel lookup by bone name; requires BuildLookup() to have run.
float GetDurationInSeconds() const
std::vector< AnimationChannel > channels
Root namespace for everything the engine exposes.
std::vector< Keyframe< Math::Quaternion > > rotationKeys
std::vector< Keyframe< Math::Vector3D > > positionKeys
std::vector< Keyframe< Math::Vector3D > > scaleKeys