2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2017-03-24 05:30:16 +00:00
|
|
|
|
2019-09-28 02:53:03 +00:00
|
|
|
#include "Runtime/Camera/CGameCamera.hpp"
|
|
|
|
|
|
|
|
#include <zeus/CTransform.hpp>
|
|
|
|
#include <zeus/CVector3f.hpp>
|
2017-03-24 05:30:16 +00:00
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
namespace metaforce {
|
2017-03-24 05:30:16 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CInterpolationCamera : public CGameCamera {
|
|
|
|
TUniqueId x188_targetId = kInvalidUniqueId;
|
|
|
|
float x18c_time = 0.f;
|
|
|
|
float x190_maxTime = 0.f;
|
|
|
|
zeus::CTransform x194_;
|
|
|
|
zeus::CVector3f x1c4_lookPos;
|
|
|
|
float x1d0_positionSpeed = 0.f;
|
|
|
|
float x1d4_rotationSpeed = 0.f;
|
|
|
|
float x1d8_ = 0.f;
|
2020-04-21 07:22:41 +00:00
|
|
|
bool x1d8_24_sinusoidal : 1 = false;
|
2018-12-08 05:30:43 +00:00
|
|
|
float x1dc_closeInAngle = M_PIF * 2.f;
|
|
|
|
|
|
|
|
bool InterpolateSinusoidal(zeus::CTransform& xf, const zeus::CVector3f& targetOrigin, const zeus::CVector3f& lookPos,
|
|
|
|
float maxTime, float curTime);
|
|
|
|
bool InterpolateWithDistance(zeus::CTransform& xf, const zeus::CVector3f& targetOrigin,
|
|
|
|
const zeus::CVector3f& lookPos, float positionSpeed, float rotationSpeed, float dt,
|
|
|
|
float maxTime, float curTime);
|
2018-06-28 01:17:01 +00:00
|
|
|
|
2017-03-24 05:30:16 +00:00
|
|
|
public:
|
2021-05-26 14:00:57 +00:00
|
|
|
DEFINE_ENTITY
|
2020-03-31 03:52:22 +00:00
|
|
|
explicit CInterpolationCamera(TUniqueId uid, const zeus::CTransform& xf);
|
2019-08-09 19:46:49 +00:00
|
|
|
void Accept(IVisitor& visitor) override;
|
|
|
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
|
|
|
void ProcessInput(const CFinalInput&, CStateManager& mgr) override;
|
2020-04-09 17:28:20 +00:00
|
|
|
void Render(CStateManager&) override;
|
2019-08-09 19:46:49 +00:00
|
|
|
void Reset(const zeus::CTransform&, CStateManager& mgr) override;
|
|
|
|
void Think(float, CStateManager&) override;
|
2018-12-08 05:30:43 +00:00
|
|
|
void SetInterpolation(const zeus::CTransform& xf, const zeus::CVector3f& lookPos, float maxTime, float positionSpeed,
|
|
|
|
float rotationSpeed, TUniqueId camId, bool sinusoidal, CStateManager& mgr);
|
|
|
|
void DeactivateInterpCamera(CStateManager&);
|
2017-03-24 05:30:16 +00:00
|
|
|
};
|
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
} // namespace metaforce
|