2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-04-05 01:51:25 +00:00
|
|
|
|
2016-04-12 22:28:08 +00:00
|
|
|
#include "RetroTypes.hpp"
|
|
|
|
#include "CSegId.hpp"
|
|
|
|
#include "zeus/CTransform.hpp"
|
|
|
|
|
2016-04-05 01:51:25 +00:00
|
|
|
namespace urde
|
|
|
|
{
|
2016-09-06 05:52:51 +00:00
|
|
|
class CCharLayoutInfo;
|
2016-04-05 01:51:25 +00:00
|
|
|
|
|
|
|
class CPoseAsTransforms
|
|
|
|
{
|
2016-09-06 05:52:51 +00:00
|
|
|
public:
|
|
|
|
struct Transform
|
|
|
|
{
|
|
|
|
zeus::CTransform m_originToAccum;
|
|
|
|
zeus::CTransform m_restPoseToAccum;
|
|
|
|
};
|
|
|
|
private:
|
2016-04-12 22:28:08 +00:00
|
|
|
CSegId x0_nextId = 0;
|
|
|
|
CSegId x1_count;
|
|
|
|
std::pair<CSegId, CSegId> x8_links[100];
|
2016-09-06 05:52:51 +00:00
|
|
|
std::unique_ptr<Transform[]> xd0_transformArr;
|
2016-04-12 22:28:08 +00:00
|
|
|
CSegId xd4_lastInserted = 0;
|
|
|
|
public:
|
|
|
|
CPoseAsTransforms(u8 boneCount);
|
|
|
|
bool ContainsDataFor(const CSegId& id) const;
|
|
|
|
void Clear();
|
|
|
|
void AccumulateScaledTransform(const CSegId& id, zeus::CMatrix3f& rotation, float scale) const;
|
|
|
|
const zeus::CTransform& GetTransform(const CSegId& id) const;
|
2016-09-06 05:52:51 +00:00
|
|
|
const zeus::CTransform& GetRestToAccumTransform(const CSegId& id) const;
|
2016-04-12 22:28:08 +00:00
|
|
|
const zeus::CVector3f& GetOffset(const CSegId& id) const;
|
|
|
|
const zeus::CMatrix3f& GetRotation(const CSegId& id) const;
|
2017-06-03 06:03:07 +00:00
|
|
|
const zeus::CMatrix3f& GetTransformMinusOffset(const CSegId& id) const { return GetRotation(id); }
|
2016-09-06 05:52:51 +00:00
|
|
|
void Insert(const CSegId& id,
|
|
|
|
const zeus::CMatrix3f& rotation,
|
|
|
|
const zeus::CVector3f& offset,
|
|
|
|
const zeus::CVector3f& restOffset);
|
2016-04-05 01:51:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|