2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2017-01-08 03:36:24 +00:00
|
|
|
|
|
|
|
#include "RetroTypes.hpp"
|
|
|
|
#include "zeus/CTransform.hpp"
|
|
|
|
#include "zeus/CVector3f.hpp"
|
|
|
|
#include "zeus/CQuaternion.hpp"
|
|
|
|
#include "Character/CSegId.hpp"
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde {
|
2017-01-08 03:36:24 +00:00
|
|
|
class CAnimData;
|
|
|
|
class CSegId;
|
2018-12-08 05:30:43 +00:00
|
|
|
class CIkChain {
|
2018-12-15 06:29:41 +00:00
|
|
|
CSegId x0_bone;
|
|
|
|
CSegId x1_p1;
|
|
|
|
CSegId x2_p2;
|
2019-02-24 07:15:54 +00:00
|
|
|
zeus::CVector3f x4_p2p1Dir = zeus::skForward;
|
|
|
|
zeus::CVector3f x10_p1BoneDir = zeus::skForward;
|
2018-12-15 06:29:41 +00:00
|
|
|
float x1c_p2p1Length = 1.f;
|
|
|
|
float x20_p1BoneLength = 1.f;
|
|
|
|
zeus::CQuaternion x24_holdRot;
|
|
|
|
zeus::CVector3f x34_holdPos;
|
2018-12-08 05:30:43 +00:00
|
|
|
float x40_time = 0.f;
|
2017-01-08 03:36:24 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
bool x44_24_activated : 1;
|
2017-01-08 03:36:24 +00:00
|
|
|
};
|
2018-12-08 05:30:43 +00:00
|
|
|
u32 x44_dummy = 0;
|
|
|
|
};
|
|
|
|
|
2017-01-08 03:36:24 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CIkChain() = default;
|
2017-01-08 03:36:24 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
bool GetActive() const { return x44_24_activated; }
|
|
|
|
void Update(float);
|
|
|
|
void Deactivate();
|
|
|
|
void Activate(const CAnimData&, const CSegId&, const zeus::CTransform&);
|
|
|
|
void PreRender(CAnimData&, const zeus::CTransform&, const zeus::CVector3f&);
|
|
|
|
void Solve(zeus::CQuaternion&, zeus::CQuaternion&, const zeus::CVector3f&);
|
2017-01-08 03:36:24 +00:00
|
|
|
};
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde
|