#include "CMetaAnimSequence.hpp" #include "CMetaAnimFactory.hpp" #include "CAnimTreeSequence.hpp" namespace urde { std::vector> CMetaAnimSequence::CreateSequence(CInputStream& in) { std::vector> ret; u32 seqCount = in.readUint32Big(); ret.reserve(seqCount); for (u32 i = 0; i < seqCount; ++i) ret.push_back(CMetaAnimFactory::CreateMetaAnim(in)); return ret; } CMetaAnimSequence::CMetaAnimSequence(CInputStream& in) : x4_sequence(CreateSequence(in)) {} void CMetaAnimSequence::GetUniquePrimitives(std::set& primsOut) const { for (const std::shared_ptr& anim : x4_sequence) anim->GetUniquePrimitives(primsOut); } std::shared_ptr CMetaAnimSequence::VGetAnimationTree(const CAnimSysContext& animSys, const CMetaAnimTreeBuildOrders& orders) const { if (orders.x0_recursiveAdvance) { CMetaAnimTreeBuildOrders modOrders; modOrders.PreAdvanceForAll(*orders.x0_recursiveAdvance); return GetAnimationTree(animSys, modOrders); } #if 0 std::vector anims; anims.reserve(anims.size()); for (const std::shared_ptr& anim : x4_sequence) { std::shared_ptr chNode = anim->GetAnimationTree(animSys, orders); anims.emplace_back(chNode->GetName()); } #endif std::shared_ptr ret = std::make_shared(x4_sequence, animSys, ""); return ret; } } // namespace urde