2016-04-16 03:24:25 +00:00
|
|
|
#include "CSegStatementSet.hpp"
|
|
|
|
#include "CSegIdList.hpp"
|
|
|
|
#include "CCharLayoutInfo.hpp"
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde {
|
2016-04-16 03:24:25 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
void CSegStatementSet::Add(const CSegIdList& list, const CCharLayoutInfo& layout, const CSegStatementSet& other,
|
|
|
|
float weight) {
|
|
|
|
for (const CSegId& id : list.GetList()) {
|
|
|
|
x4_segData[id].x0_rotation *=
|
|
|
|
zeus::CQuaternion::slerp(zeus::CQuaternion::skNoRotation, other.x4_segData[id].x0_rotation, weight);
|
|
|
|
if (other.x4_segData[id].x1c_hasOffset && x4_segData[id].x1c_hasOffset) {
|
|
|
|
zeus::CVector3f off = other.x4_segData[id].x10_offset - layout.GetFromParentUnrotated(id);
|
|
|
|
x4_segData[id].x10_offset += off * weight;
|
2016-04-16 03:24:25 +00:00
|
|
|
}
|
2018-12-08 05:30:43 +00:00
|
|
|
}
|
2016-04-16 03:24:25 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde
|