metaforce/Runtime/Camera/CInterpolationCamera.hpp

43 lines
1.7 KiB
C++
Raw Permalink Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2017-03-24 05:30:16 +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;
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
explicit CInterpolationCamera(TUniqueId uid, const zeus::CTransform& xf);
void Accept(IVisitor& visitor) override;
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
void ProcessInput(const CFinalInput&, CStateManager& mgr) override;
void Render(CStateManager&) override;
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