2016-04-10 21:22:59 +00:00
|
|
|
#include "CMetaAnimRandom.hpp"
|
2016-04-11 03:59:54 +00:00
|
|
|
#include "CMetaAnimFactory.hpp"
|
2016-04-10 21:22:59 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
|
2016-04-11 03:59:54 +00:00
|
|
|
CMetaAnimRandom::RandomData CMetaAnimRandom::CreateRandomData(CInputStream& in)
|
2016-04-10 21:22:59 +00:00
|
|
|
{
|
2016-04-11 03:59:54 +00:00
|
|
|
CMetaAnimRandom::RandomData ret;
|
|
|
|
u32 randCount = in.readUint32Big();
|
|
|
|
ret.reserve(randCount);
|
|
|
|
|
|
|
|
for (u32 i=0 ; i<randCount ; ++i)
|
|
|
|
{
|
|
|
|
std::shared_ptr<IMetaAnim> metaAnim = CMetaAnimFactory::CreateMetaAnim(in);
|
|
|
|
ret.emplace_back(std::move(metaAnim), in.readUint32Big());
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
2016-04-10 21:22:59 +00:00
|
|
|
}
|
|
|
|
|
2016-04-11 03:59:54 +00:00
|
|
|
CMetaAnimRandom::CMetaAnimRandom(CInputStream& in)
|
|
|
|
: x4_randomData(CreateRandomData(in)) {}
|
|
|
|
|
2016-04-10 21:22:59 +00:00
|
|
|
void CMetaAnimRandom::GetUniquePrimitives(std::set<CPrimitive>& primsOut) const
|
|
|
|
{
|
2017-11-24 08:01:06 +00:00
|
|
|
for (const auto& pair : x4_randomData)
|
|
|
|
pair.first->GetUniquePrimitives(primsOut);
|
2016-04-10 21:22:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
std::shared_ptr<CAnimTreeNode>
|
|
|
|
CMetaAnimRandom::VGetAnimationTree(const CAnimSysContext& animSys,
|
|
|
|
const CMetaAnimTreeBuildOrders& orders) const
|
|
|
|
{
|
2016-05-21 03:02:09 +00:00
|
|
|
return {};
|
2016-04-10 21:22:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|