void FrameLerp(ArmatureFrameView out, ArmatureFrameConstView lhs, ArmatureFrameConstView rhs, float t, const IArmature& armature, bool rebuild) { //assert((Armature == lhs.pArmature) && (lhs.pArmature == rhs.pArmature)); XMVECTOR vt = XMVectorReplicate(t); for (size_t i = 0; i < armature.size(); i++) { XMStoreA(out[i].LclRotation, DirectX::XMQuaternionSlerpV(XMLoadA(lhs[i].LclRotation), XMLoadA(rhs[i].LclRotation), vt)); XMStoreA(out[i].LclScaling, DirectX::XMVectorLerpV(XMLoadA(lhs[i].LclScaling), XMLoadA(rhs[i].LclScaling), vt)); XMStoreA(out[i].LclTranslation, DirectX::XMVectorLerpV(XMLoadA(lhs[i].LclTranslation), XMLoadA(rhs[i].LclTranslation), vt)); } if (rebuild) FrameRebuildGlobal(armature, out); }
ArmatureFrame::ArmatureFrame(const IArmature & armature) { assert(this->size() == armature.size()); auto df = armature.bind_frame(); BaseType::assign(df.begin(), df.end()); }