metaforce/Runtime/Character/CAnimationDatabaseGame.cpp

37 lines
1.2 KiB
C++
Raw Normal View History

2016-04-13 06:07:23 +00:00
#include "CAnimationDatabaseGame.hpp"
#include "IMetaAnim.hpp"
#include "CPrimitive.hpp"
#include "CAnimation.hpp"
2018-12-08 05:30:43 +00:00
namespace urde {
2016-04-13 06:07:23 +00:00
2018-12-08 05:30:43 +00:00
CAnimationDatabaseGame::CAnimationDatabaseGame(const std::vector<CAnimation>& anims) {
x10_anims.reserve(anims.size());
for (const CAnimation& anim : anims)
x10_anims.emplace_back(anim.GetMetaAnim());
2016-04-13 06:07:23 +00:00
}
2018-12-08 05:30:43 +00:00
const std::shared_ptr<IMetaAnim>& CAnimationDatabaseGame::GetMetaAnim(u32 idx) const { return x10_anims[idx]; }
2016-04-13 06:07:23 +00:00
2018-12-08 05:30:43 +00:00
u32 CAnimationDatabaseGame::GetNumMetaAnims() const { return x10_anims.size(); }
const char* CAnimationDatabaseGame::GetMetaAnimName(u32 idx) const {
return "Meta-animation name unavailable in Release mode.";
2016-04-13 06:07:23 +00:00
}
2018-12-08 05:30:43 +00:00
void CAnimationDatabaseGame::GetAllUniquePrimitives(std::vector<CPrimitive>& primsOut) const {
std::set<CPrimitive> primitives;
for (const std::shared_ptr<IMetaAnim>& anim : x10_anims)
anim->GetUniquePrimitives(primitives);
primsOut.reserve(primitives.size());
for (const CPrimitive& prim : primitives)
primsOut.push_back(prim);
2016-04-13 06:07:23 +00:00
}
void CAnimationDatabaseGame::GetUniquePrimitivesFromMetaAnim(std::set<CPrimitive>& primsOut,
2018-12-08 05:30:43 +00:00
std::string_view name) const {
// Empty
2018-01-30 01:04:01 +00:00
}
2016-04-13 06:07:23 +00:00
2018-12-08 05:30:43 +00:00
} // namespace urde