metaforce/Runtime/Character/CAnimTreeTweenBase.cpp

54 lines
1.6 KiB
C++
Raw Normal View History

2016-09-04 02:27:35 +00:00
#include "CAnimTreeTweenBase.hpp"
namespace urde
{
2016-09-11 18:40:33 +00:00
s32 CAnimTreeTweenBase::sAdvancementDepth = 0;
2016-09-10 04:50:00 +00:00
CAnimTreeTweenBase::CAnimTreeTweenBase(bool b1, const std::weak_ptr<CAnimTreeNode>& a,
2017-11-13 06:19:18 +00:00
const std::weak_ptr<CAnimTreeNode>& b, int flags, std::string_view name)
2016-09-04 02:27:35 +00:00
: CAnimTreeDoubleChild(a, b, name), x1c_flags(flags), x20_31_b1(b1)
{
}
2016-09-14 05:45:46 +00:00
/*void CAnimTreeTweenBase::VGetTotalChildWeight(float t) const
2016-09-11 01:25:59 +00:00
{
2016-09-14 05:45:46 +00:00
}*/
2016-09-11 01:25:59 +00:00
2016-09-14 05:45:46 +00:00
void CAnimTreeTweenBase::VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut) const {}
2016-09-04 02:27:35 +00:00
void CAnimTreeTweenBase::VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut,
const CCharAnimTime& time) const
{
}
2016-09-11 01:25:59 +00:00
bool CAnimTreeTweenBase::VHasOffset(const CSegId& seg) const
{
2016-09-14 05:45:46 +00:00
return (x14_a->VHasOffset(seg) || x18_b->VHasOffset(seg));
2016-09-11 01:25:59 +00:00
}
2016-09-04 02:27:35 +00:00
2016-09-11 01:25:59 +00:00
zeus::CVector3f CAnimTreeTweenBase::VGetOffset(const CSegId& seg) const
{
2016-09-14 05:45:46 +00:00
const float weight = GetBlendingWeight();
if (weight >= 1.0f)
return x18_b->VGetOffset(seg);
const zeus::CVector3f oA = x14_a->VGetOffset(seg);
const zeus::CVector3f oB = x18_b->VGetOffset(seg);
return zeus::CVector3f::lerp(oA, oB, weight);
2016-09-11 01:25:59 +00:00
}
2016-09-04 02:27:35 +00:00
2016-09-11 01:25:59 +00:00
zeus::CQuaternion CAnimTreeTweenBase::VGetRotation(const CSegId& seg) const
{
2016-09-14 05:45:46 +00:00
const float weight = GetBlendingWeight();
if (weight >= 1.0f)
return x18_b->VGetRotation(seg);
2016-09-04 02:27:35 +00:00
2016-09-14 05:45:46 +00:00
const zeus::CQuaternion qA = x14_a->VGetRotation(seg);
const zeus::CQuaternion qB = x18_b->VGetRotation(seg);
return zeus::CQuaternion::slerp(qA, qB, weight);
2016-09-11 01:25:59 +00:00
}
2016-09-14 05:45:46 +00:00
2017-03-01 06:02:54 +00:00
std::pair<std::unique_ptr<IAnimReader>, bool> CAnimTreeTweenBase::VSimplified() { return {}; }
2016-09-04 02:27:35 +00:00
}