2020-01-15 04:07:48 -08:00
|
|
|
#include "Runtime/Character/CSkinBank.hpp"
|
|
|
|
|
|
|
|
#include "Runtime/Character/CPoseAsTransforms.hpp"
|
2016-04-12 15:28:08 -07:00
|
|
|
|
2021-04-10 01:42:06 -07:00
|
|
|
namespace metaforce {
|
2016-04-12 15:28:08 -07:00
|
|
|
|
2018-12-07 21:30:43 -08:00
|
|
|
CSkinBank::CSkinBank(CInputStream& in) {
|
2022-02-17 23:37:54 -08:00
|
|
|
u32 boneCount = in.ReadLong();
|
2018-12-07 21:30:43 -08:00
|
|
|
x0_segments.reserve(boneCount);
|
|
|
|
for (u32 i = 0; i < boneCount; ++i)
|
|
|
|
x0_segments.emplace_back(in);
|
2016-04-12 15:28:08 -07:00
|
|
|
}
|
|
|
|
|
2018-12-07 21:30:43 -08:00
|
|
|
void CSkinBank::GetBankTransforms(std::vector<const zeus::CTransform*>& out, const CPoseAsTransforms& pose) const {
|
|
|
|
for (CSegId id : x0_segments) {
|
|
|
|
const zeus::CTransform& xf = pose.GetRestToAccumTransform(id);
|
|
|
|
out.push_back(&xf);
|
|
|
|
}
|
2016-08-21 13:39:18 -07:00
|
|
|
}
|
|
|
|
|
2021-04-10 01:42:06 -07:00
|
|
|
} // namespace metaforce
|