metaforce/Runtime/Character/CAnimData.cpp

289 lines
6.9 KiB
C++
Raw Normal View History

#include "CAnimData.hpp"
#include "CCharacterInfo.hpp"
#include "CCharLayoutInfo.hpp"
#include "Graphics/CSkinnedModel.hpp"
#include "CCharacterFactory.hpp"
#include "CAnimationManager.hpp"
#include "CTransitionManager.hpp"
2016-04-16 03:24:25 +00:00
#include "CAdditiveAnimPlayback.hpp"
#include "CBoolPOINode.hpp"
#include "CInt32POINode.hpp"
#include "CParticlePOINode.hpp"
#include "CSoundPOINode.hpp"
#include "CParticleGenInfo.hpp"
2016-04-14 21:42:47 +00:00
#include "IAnimReader.hpp"
#include "CAnimTreeNode.hpp"
namespace urde
{
rstl::reserved_vector<CBoolPOINode, 8>CAnimData::g_BoolPOINodes;
rstl::reserved_vector<CInt32POINode, 16> CAnimData::g_Int32POINodes;
rstl::reserved_vector<CParticlePOINode, 20> CAnimData::g_ParticlePOINodes;
rstl::reserved_vector<CSoundPOINode, 20> CAnimData::g_SoundPOINodes;
2016-04-14 03:32:27 +00:00
void CAnimData::FreeCache()
{
}
void CAnimData::InitializeCache()
{
}
2016-04-15 03:02:21 +00:00
CAnimData::CAnimData(ResId id,
const CCharacterInfo& character,
int defaultAnim, int charIdx, bool loop,
const TLockedToken<CCharLayoutInfo>& layout,
const TToken<CSkinnedModel>& model,
2016-04-15 03:02:21 +00:00
const std::experimental::optional<TToken<CMorphableSkinnedModel>>& iceModel,
const std::weak_ptr<CAnimSysContext>& ctx,
const std::shared_ptr<CAnimationManager>& animMgr,
const std::shared_ptr<CTransitionManager>& transMgr,
const TLockedToken<CCharacterFactory>& charFactory)
: x0_charFactory(charFactory),
xc_charInfo(character),
xcc_layoutData(layout),
xd8_modelData(model),
xfc_animCtx(ctx.lock()),
x100_animMgr(animMgr),
x1d8_selfId(id),
x1fc_transMgr(transMgr),
2016-04-15 03:02:21 +00:00
x204_charIdx(charIdx),
x208_defaultAnim(defaultAnim),
x21c_25_loop(loop),
x220_pose(layout->GetSegIdList().GetList().size()),
x2f8_poseBuilder(layout)
{
2016-04-15 03:02:21 +00:00
if (iceModel)
xe4_iceModelData = *iceModel;
g_BoolPOINodes.resize(8);
g_Int32POINodes.resize(16);
g_ParticlePOINodes.resize(20);
g_SoundPOINodes.resize(20);
x108_aabb = xd8_modelData->GetModel()->GetAABB();
x120_particleDB.CacheParticleDesc(xc_charInfo.GetParticleResData());
}
2016-04-16 03:24:25 +00:00
ResId CAnimData::GetEventResourceIdForAnimResourceId(ResId id) const
2016-04-14 03:32:27 +00:00
{
2016-04-16 03:24:25 +00:00
return x0_charFactory->GetEventResourceIdForAnimResourceId(id);
2016-04-14 03:32:27 +00:00
}
void CAnimData::AddAdditiveSegData(const CSegIdList& list, CSegStatementSet& stSet)
{
for (std::pair<u32, CAdditiveAnimPlayback>& additive : x1044_additiveAnims)
if (additive.second.GetTargetWeight() > 0.00001f)
additive.second.AddToSegStatementSet(list, *xcc_layoutData.GetObj(), stSet);
}
static void AdvanceAnimationTree(std::weak_ptr<CAnimTreeNode>& anim, const CCharAnimTime& dt)
2016-04-14 03:32:27 +00:00
{
}
void CAnimData::AdvanceAdditiveAnims(float dt)
2016-04-14 03:32:27 +00:00
{
CCharAnimTime time(dt);
for (std::pair<u32, CAdditiveAnimPlayback>& additive : x1044_additiveAnims)
{
if (additive.second.GetA())
{
while (time.GreaterThanZero() && std::fabs(time) >= 0.00001f)
{
//additive.second.GetAnim()->GetInt32POIList(time, );
}
}
else
{
}
}
2016-04-14 03:32:27 +00:00
}
void CAnimData::UpdateAdditiveAnims(float)
{
}
bool CAnimData::IsAdditiveAnimation(u32) const
{
}
std::shared_ptr<CAnimTreeNode> CAnimData::GetAdditiveAnimationTree(u32) const
{
}
bool CAnimData::IsAdditiveAnimationActive(u32) const
{
}
void CAnimData::DelAdditiveAnimation(u32)
{
}
void CAnimData::AddAdditiveAnimation(u32, float, bool, bool)
{
}
std::shared_ptr<CAnimationManager> CAnimData::GetAnimationManager()
{
}
void CAnimData::SetPhase(float)
{
}
void CAnimData::Touch(const CSkinnedModel& model, int) const
{
}
2016-04-14 21:42:47 +00:00
SAdvancementDeltas CAnimData::GetAdvancementDeltas(const CCharAnimTime& a,
const CCharAnimTime& b) const
2016-04-14 03:32:27 +00:00
{
}
CCharAnimTime CAnimData::GetTimeOfUserEvent(EUserEventType, const CCharAnimTime& time) const
{
}
void CAnimData::MultiplyPlaybackRate(float)
{
}
void CAnimData::SetPlaybackRate(float)
{
}
void CAnimData::SetRandomPlaybackRate(CRandom16&)
{
}
void CAnimData::CalcPlaybackAlignmentParms(const CAnimPlaybackParms& parms,
const std::weak_ptr<CAnimTreeNode>& node)
{
}
zeus::CTransform CAnimData::GetLocatorTransform(CSegId id, const CCharAnimTime* time) const
{
}
zeus::CTransform CAnimData::GetLocatorTransform(const std::string& name, const CCharAnimTime* time) const
{
}
bool CAnimData::IsAnimTimeRemaining(float, const std::string& name) const
{
}
float CAnimData::GetAnimTimeRemaining(const std::string& name) const
{
}
float CAnimData::GetAnimationDuration(int) const
{
}
std::shared_ptr<CAnimSysContext> CAnimData::GetAnimSysContext() const
{
}
std::shared_ptr<CAnimationManager> CAnimData::GetAnimationManager() const
{
}
void CAnimData::RecalcPoseBuilder(const CCharAnimTime*) const
{
}
void CAnimData::RenderAuxiliary(const CFrustumPlanes& frustum) const
{
}
void CAnimData::Render(const CSkinnedModel& model, const CModelFlags& drawFlags,
const std::experimental::optional<CVertexMorphEffect>& morphEffect,
const float* morphMagnitudes) const
{
}
void CAnimData::SetupRender(const CSkinnedModel& model,
const std::experimental::optional<CVertexMorphEffect>& morphEffect,
const float* morphMagnitudes) const
{
}
void CAnimData::PreRender()
{
}
void CAnimData::BuildPose()
{
}
void CAnimData::PrimitiveSetToTokenVector(const std::set<CPrimitive>& primSet, std::vector<CToken>& tokensOut)
{
}
void CAnimData::GetAnimationPrimitives(const CAnimPlaybackParms& parms, std::set<CPrimitive>& primsOut) const
{
}
void CAnimData::SetAnimation(const CAnimPlaybackParms& parms, bool)
{
}
void CAnimData::DoAdvance(float, bool&, CRandom16&, bool)
{
}
2016-04-14 21:42:47 +00:00
SAdvancementDeltas CAnimData::Advance(float, const zeus::CVector3f&, CStateManager& stateMgr, bool)
2016-04-14 03:32:27 +00:00
{
}
2016-04-14 21:42:47 +00:00
SAdvancementDeltas CAnimData::AdvanceIgnoreParticles(float, CRandom16&, bool)
2016-04-14 03:32:27 +00:00
{
}
void CAnimData::AdvanceAnim(CCharAnimTime& time, zeus::CVector3f&, zeus::CQuaternion&)
{
}
void CAnimData::SetXRayModel(const TLockedToken<CModel>& model, const TLockedToken<CSkinRules>& skinRules)
{
}
void CAnimData::SetInfraModel(const TLockedToken<CModel>& model, const TLockedToken<CSkinRules>& skinRules)
{
}
void CAnimData::PoseSkinnedModel(const CSkinnedModel& model, const CPoseAsTransforms& pose,
const std::experimental::optional<CVertexMorphEffect>& morphEffect,
const float* morphMagnitudes) const
{
}
void CAnimData::AdvanceParticles(const zeus::CTransform& xf, float,
const zeus::CVector3f&, CStateManager& stateMgr)
{
}
void CAnimData::GetAverageVelocity(int) const
{
}
void CAnimData::ResetPOILists()
{
}
CSegId CAnimData::GetLocatorSegId(const std::string& name) const
{
}
zeus::CAABox CAnimData::GetBoundingBox(const zeus::CTransform& xf) const
{
}
zeus::CAABox CAnimData::GetBoundingBox() const
{
}
}