mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 13:07:42 +00:00
Implement GetLocatorTransform
This commit is contained in:
@@ -178,12 +178,20 @@ void CAnimData::CalcPlaybackAlignmentParms(const CAnimPlaybackParms& parms,
|
||||
|
||||
zeus::CTransform CAnimData::GetLocatorTransform(CSegId id, const CCharAnimTime* time) const
|
||||
{
|
||||
return {};
|
||||
if (id == 0xFF)
|
||||
return {};
|
||||
|
||||
zeus::CTransform ret;
|
||||
if (!x220_31_poseCached)
|
||||
const_cast<CAnimData*>(this)->RecalcPoseBuilder(time);
|
||||
|
||||
x2fc_poseBuilder.BuildTransform(id, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
zeus::CTransform CAnimData::GetLocatorTransform(const std::string& name, const CCharAnimTime* time) const
|
||||
{
|
||||
return {};
|
||||
return GetLocatorTransform(xcc_layoutData->GetSegIdFromString(name), time);
|
||||
}
|
||||
|
||||
bool CAnimData::IsAnimTimeRemaining(float, const std::string& name) const
|
||||
|
||||
@@ -16,6 +16,15 @@ zeus::CVector3f CCharLayoutInfo::GetFromParentUnrotated(const CSegId& id) const
|
||||
}
|
||||
}
|
||||
|
||||
CSegId CCharLayoutInfo::GetSegIdFromString(const std::string& name) const
|
||||
{
|
||||
auto it = x18_segIdMap.find(name);
|
||||
if (it == x18_segIdMap.end())
|
||||
return {};
|
||||
|
||||
return (*it).second;
|
||||
}
|
||||
|
||||
void CCharLayoutNode::Bone::read(CInputStream& in)
|
||||
{
|
||||
x0_parentId = CSegId(in);
|
||||
|
||||
@@ -37,6 +37,7 @@ public:
|
||||
const std::shared_ptr<CCharLayoutNode>& GetRootNode() const {return x0_node;}
|
||||
const CSegIdList& GetSegIdList() const {return x8_segIdList;}
|
||||
zeus::CVector3f GetFromParentUnrotated(const CSegId& id) const;
|
||||
CSegId GetSegIdFromString(const std::string& name) const;
|
||||
};
|
||||
|
||||
CFactoryFnReturn FCharLayoutInfo(const SObjectTag&, CInputStream&, const CVParamTransfer&,
|
||||
|
||||
Reference in New Issue
Block a user