2016-04-16 21:49:47 +00:00
|
|
|
#ifndef __URDE_CGAMECAMERA_HPP__
|
|
|
|
#define __URDE_CGAMECAMERA_HPP__
|
|
|
|
|
2016-04-17 02:50:45 +00:00
|
|
|
#include "World/CActor.hpp"
|
|
|
|
#include "zeus/CTransform.hpp"
|
2016-04-16 21:49:47 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
2016-08-15 01:19:04 +00:00
|
|
|
class CFinalInput;
|
2016-04-16 21:49:47 +00:00
|
|
|
|
|
|
|
class CGameCamera : public CActor
|
|
|
|
{
|
2017-03-24 05:30:16 +00:00
|
|
|
friend class CStateManager;
|
|
|
|
friend class CCameraManager;
|
|
|
|
|
2016-09-14 05:45:46 +00:00
|
|
|
TUniqueId xe8_watchedObject;
|
|
|
|
zeus::CMatrix4f xec_perspectiveMatrix;
|
|
|
|
zeus::CTransform x12c_;
|
2016-10-31 22:56:44 +00:00
|
|
|
float x15c_currentFov;
|
2016-09-14 05:45:46 +00:00
|
|
|
float x160_znear;
|
|
|
|
float x164_zfar;
|
|
|
|
float x168_aspect;
|
2017-03-24 05:30:16 +00:00
|
|
|
u32 x16c_controllerIdx;
|
2017-01-25 04:40:19 +00:00
|
|
|
bool x170_24_perspDirty : 1;
|
|
|
|
bool x170_25_disablesInput : 1;
|
2016-09-14 05:45:46 +00:00
|
|
|
float x174_ = 0.f;
|
|
|
|
float x178_ = 0.f;
|
|
|
|
float x17c_ = 0.f;
|
|
|
|
float x180_;
|
2016-10-31 22:56:44 +00:00
|
|
|
float x184_fov;
|
2016-04-16 21:49:47 +00:00
|
|
|
public:
|
2016-09-14 05:45:46 +00:00
|
|
|
CGameCamera(TUniqueId, bool active, const std::string& name, const CEntityInfo& info, const zeus::CTransform& xf,
|
2017-03-24 05:30:16 +00:00
|
|
|
float fov, float nearz, float farz, float aspect, TUniqueId, bool, u32 controllerIdx);
|
2016-08-15 01:19:04 +00:00
|
|
|
|
2016-09-14 05:45:46 +00:00
|
|
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&);
|
|
|
|
void SetActive(bool active);
|
|
|
|
virtual void ProcessInput(const CFinalInput&, CStateManager& mgr) = 0;
|
|
|
|
virtual void Reset(const zeus::CTransform&, CStateManager& mgr) = 0;
|
|
|
|
|
|
|
|
const zeus::CTransform& GetTransform() const { return x34_transform; }
|
|
|
|
zeus::CMatrix4f GetPerspectiveMatrix() const;
|
|
|
|
zeus::CVector3f ConvertToScreenSpace(const zeus::CVector3f&) const;
|
|
|
|
zeus::CTransform ValidateCameraTransform(const zeus::CTransform&, const zeus::CTransform&);
|
2017-03-03 07:18:12 +00:00
|
|
|
float GetNearClipDistance() const { return x160_znear; }
|
|
|
|
float GetFarClipDistance() const { return x164_zfar; }
|
|
|
|
float GetAspectRatio() const { return x168_aspect; }
|
|
|
|
TUniqueId GetWatchedObject() const { return xe8_watchedObject; }
|
|
|
|
float GetFov() const { return x15c_currentFov; }
|
2016-09-14 05:45:46 +00:00
|
|
|
void GetControllerNumber() const;
|
|
|
|
bool DisablesInput() const;
|
2016-10-31 22:56:44 +00:00
|
|
|
void UpdatePerspective(float);
|
2017-08-18 01:30:15 +00:00
|
|
|
void SetFovInterpolation(float start, float end, float time, float f4);
|
2016-09-15 07:26:35 +00:00
|
|
|
void sub8005AF88();
|
2016-09-14 05:45:46 +00:00
|
|
|
};
|
2016-04-16 21:49:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CGAMECAMERA_HPP__
|