metaforce/Runtime/Character/CPASAnimState.hpp

34 lines
1.1 KiB
C++
Raw Normal View History

2016-04-13 06:07:23 +00:00
#ifndef __URDE_CPASANIMSTATE_HPP__
#define __URDE_CPASANIMSTATE_HPP__
2016-04-10 04:49:02 +00:00
#include "IOStreams.hpp"
#include "CPASParmInfo.hpp"
#include "CPASAnimInfo.hpp"
namespace urde
{
class CRandom16;
class CPASAnimParmData;
2016-04-10 04:49:02 +00:00
class CPASAnimState
{
s32 x0_id;
2016-04-10 04:49:02 +00:00
std::vector<CPASParmInfo> x4_parms;
std::vector<CPASAnimInfo> x14_anims;
2016-08-21 05:47:47 +00:00
std::vector<s32> x24_selectionCache;
2016-04-10 04:49:02 +00:00
public:
CPASAnimState(CInputStream& in);
2017-07-06 21:06:56 +00:00
CPASAnimState(int stateId);
s32 GetStateId() const {return x0_id;}
s32 GetNumAnims() const { return x14_anims.size(); }
2016-08-21 05:47:47 +00:00
CPASAnimParm GetAnimParmData(s32, u32) const;
s32 PickRandomAnimation(CRandom16 &rand) const;
std::pair<float,s32> FindBestAnimation(const rstl::reserved_vector<CPASAnimParm,8>&, CRandom16&, s32) const;
float ComputeExactMatchWeight(u32, const CPASAnimParm&, CPASAnimParm::UParmValue) const;
float ComputePercentErrorWeight(u32, const CPASAnimParm&, CPASAnimParm::UParmValue) const;
float ComputeAngularPercentErrorWeight(u32, const CPASAnimParm&, CPASAnimParm::UParmValue) const;
2016-04-10 04:49:02 +00:00
};
}
2016-04-13 06:07:23 +00:00
#endif // __URDE_CPASANIMSTATE_HPP__