2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-04-05 01:51:25 +00:00
|
|
|
|
2020-03-16 20:07:04 +00:00
|
|
|
#include <array>
|
2019-09-28 02:53:03 +00:00
|
|
|
#include <memory>
|
|
|
|
#include <utility>
|
|
|
|
|
2020-04-20 01:09:30 +00:00
|
|
|
#include "Runtime/Character/CCharLayoutInfo.hpp"
|
2019-09-28 02:53:03 +00:00
|
|
|
#include "Runtime/Character/CSegId.hpp"
|
2022-03-10 06:33:17 +00:00
|
|
|
#include "Runtime/RetroTypes.hpp"
|
2019-09-28 02:53:03 +00:00
|
|
|
|
|
|
|
#include <zeus/CMatrix3f.hpp>
|
|
|
|
#include <zeus/CTransform.hpp>
|
|
|
|
#include <zeus/CVector3f.hpp>
|
2016-04-12 22:28:08 +00:00
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
namespace metaforce {
|
2018-12-08 05:30:43 +00:00
|
|
|
class CPoseAsTransforms {
|
2018-12-15 06:29:41 +00:00
|
|
|
friend class CAnimData;
|
2021-06-07 19:29:18 +00:00
|
|
|
|
2016-09-06 05:52:51 +00:00
|
|
|
private:
|
2018-12-08 05:30:43 +00:00
|
|
|
CSegId x0_nextId = 0;
|
|
|
|
CSegId x1_count;
|
2020-03-16 20:07:04 +00:00
|
|
|
std::array<std::pair<CSegId, CSegId>, 100> x8_links;
|
2022-03-10 06:33:17 +00:00
|
|
|
std::unique_ptr<zeus::CTransform[]> xd0_transformArr;
|
2018-12-08 05:30:43 +00:00
|
|
|
CSegId xd4_lastInserted = 0;
|
|
|
|
|
2016-04-12 22:28:08 +00:00
|
|
|
public:
|
2020-03-16 20:05:50 +00:00
|
|
|
explicit CPoseAsTransforms(u8 boneCount);
|
2022-03-10 06:33:17 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
void Clear();
|
|
|
|
void AccumulateScaledTransform(const CSegId& id, zeus::CMatrix3f& rotation, float scale) const;
|
2022-03-10 06:33:17 +00:00
|
|
|
void Insert(const CSegId& id, const zeus::CMatrix3f& rotation, const zeus::CVector3f& offset);
|
|
|
|
|
|
|
|
[[nodiscard]] bool ContainsDataFor(const CSegId& id) const;
|
|
|
|
[[nodiscard]] const zeus::CTransform& GetTransform(const CSegId& id) const;
|
|
|
|
[[nodiscard]] const zeus::CVector3f& GetOffset(const CSegId& id) const;
|
|
|
|
[[nodiscard]] const zeus::CMatrix3f& GetRotation(const CSegId& id) const;
|
|
|
|
[[nodiscard]] CSegId GetLastInserted() const { return xd4_lastInserted; }
|
|
|
|
[[nodiscard]] CSegId GetParent(const CSegId& id) const;
|
2016-04-05 01:51:25 +00:00
|
|
|
};
|
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
} // namespace metaforce
|