// CFTTCamera - [2020-04-13 11:57:46]
#ifndef _CFTTCAMERA_H_
#define _CFTTCAMERA_H_

#include "CFTTVector32.h"
#include "CFTTFrustum32.h"
#include "CFTTCone32.h"
#include "CFTTSphere32.h"
#include "CFTTAABB32.h"
#include "CFTTMatrix32.h"

/*
001FF48C  CFTTCamera::Initialise()
001FF490  CFTTCamera::Reset()
001FF588  CFTTCamera::Shutdown()
001FF58C  CFTTCamera::ApplyCameraSettings()
001FF5B4  CFTTCamera::EvaluateMatricesAndFrustum()
001FFA3C  CFTTCamera::SetPosition(CFTTVector32 const&)
001FFA64  CFTTCamera::GetPosition(CFTTVector32 &)
001FFA7C  CFTTCamera::SetFrustum(CFTTFrustum32)
001FFAA4  CFTTCamera::GetFrustum(CFTTFrustum32 &)
001FFAB8  CFTTCamera::GetFrustumSphere(CFTTSphere32 &)
001FFAD0  CFTTCamera::GetFrustumCone(CFTTCone32 &)
001FFAE0  CFTTCamera::SetOrientation(CFTTMatrix32 const&)
001FFB04  CFTTCamera::SetDirection(CFTTVector32 const&,CFTTVector32 const*)
001FFB38  CFTTCamera::GetOrientation(CFTTMatrix32 &)
001FFB48  CFTTCamera::GetForwardDirection(CFTTVector32 &)
001FFB6C  CFTTCamera::GetUpDirection(CFTTVector32 &)
001FFB90  CFTTCamera::GetRightDirection(CFTTVector32 &)
001FFBB4  CFTTCamera::LookAt(CFTTVector32 const&,CFTTVector32 const*)
001FFC8C  CFTTCamera::LookAt(CFTTVector32 const&,CFTTVector32 const&,float,CFTTVector32 const*)
001FFCF8  CFTTCamera::SetOrthographic(float,float,float,float,float,float)
001FFDD8  CFTTCamera::SetNearAndFarPlanes(float,float)
001FFE28  CFTTCamera::SetFOV(float)
001FFE5C  CFTTCamera::SetOrthographic(float,float,bool)
001FFEB0  CFTTCamera::GetOrthoSettings(float &,float &,float &,float &)
001FFEFC  CFTTCamera::GetViewport(int &,int &)
001FFF1C  CFTTCamera::SetViewport(int,int,float)
001FFF88  CFTTCamera::IsOrthographic()
001FFFA8  CFTTCamera::GetFOV()
001FFFB8  CFTTCamera::GetNearAndFarPlanes(float &,float &)
001FFFD8  CFTTCamera::SetPerspectiveOffsets(float fXOffset, float fYOffset)
00200028  CFTTCamera::GetPerspectiveOffsets(float &,float &)
00200048  CFTTCamera::IsSphereInFrustum(CFTTSphere32 const&,bool *)
002001DC  CFTTCamera::IsAABBInFrustum(CFTTAABB32 const&,bool *)
002002D0  CFTTCamera::WorldSpaceToScreenSpace(CFTTVector32 const&,CFTTVector32&,bool)
0020040C  CFTTCamera::ScreenSpaceToWorldSpace(float,float,CFTTVector32 &,CFTTVector32 &)
002004F8  CFTTCamera::GetCanonicalToRenderMat()

*/

class CFTTCamera {
public:
  static void Initialise();                                                                     // 001FF48C
  static void Reset();                                                                          // 001FF490
  static void Shutdown();                                                                       // 001FF588
  static void ApplyCameraSettings();                                                            // 001FF58C
  static void EvaluateMatricesAndFrustum();                                                     // 001FF5B4
  static void SetPosition(CFTTVector32 const &);                                                // 001FFA3C
  static void GetPosition(CFTTVector32 &);                                                      // 001FFA64
  static void SetFrustum(CFTTFrustum32);                                                        // 001FFA7C
  static void GetFrustum(CFTTFrustum32 &);                                                      // 001FFAA4
  static void GetFrustumSphere(CFTTSphere32 &);                                                 // 001FFAB8
  static void GetFrustumCone(CFTTCone32 &);                                                     // 001FFAD0
  static void SetOrientation(CFTTMatrix32 const &);                                             // 001FFAE0
  static void SetDirection(CFTTVector32 const &, CFTTVector32 const *);                         // 001FFB04
  static void GetOrientation(CFTTMatrix32 &);                                                   // 001FFB38
  static void GetForwardDirection(CFTTVector32 &);                                              // 001FFB48
  static void GetUpDirection(CFTTVector32 &);                                                   // 001FFB6C
  static void GetRightDirection(CFTTVector32 &);                                                // 001FFB90
  static void LookAt(CFTTVector32 const &, CFTTVector32 const *);                               // 001FFBB4
  static void LookAt(CFTTVector32 const &, CFTTVector32 const &, float, CFTTVector32 const *);  // 001FFC8C
  static void SetOrthographic(float, float, float, float, float, float);                        // 001FFCF8
  static void SetNearAndFarPlanes(float, float);                                                // 001FFDD8
  static void SetFOV(float);                                                                    // 001FFE28
  static void SetOrthographic(float, float, bool);                                              // 001FFE5C
  static bool GetOrthoSettings(float &, float &, float &, float &);                             // 001FFEB0
  static void GetViewport(int &, int &);                                                        // 001FFEFC
  static void SetViewport(int, int, float);                                                     // 001FFF1C
  static bool IsOrthographic();                                                                 // 001FFF88
  static float GetFOV();                                                                        // 001FFFA8
  static void GetNearAndFarPlanes(float &, float &);                                            // 001FFFB8
  static void SetPerspectiveOffsets(float fXOffset, float fYOffset);                            // 001FFFD8
  static void GetPerspectiveOffsets(float &, float &);                                          // 00200028
  static bool IsSphereInFrustum(CFTTSphere32 const &, bool *);                                  // 00200048
  static bool IsAABBInFrustum(CFTTAABB32 const &, bool *);                                      // 002001DC
  static int WorldSpaceToScreenSpace(CFTTVector32 const &, CFTTVector32 &, bool);               // 002002D0
  static void ScreenSpaceToWorldSpace(float, float, CFTTVector32 &, CFTTVector32 &);            // 0020040C
  static CFTTMatrix32 GetCanonicalToRenderMat();                                                // 002004F8

  static CFTTVector32 s_tPosition;
  static CFTTMatrix32 s_tOrientation;
  static float s_fNearPlane;
  static float s_fPerspectiveYOffset;
  static float s_fPerspectiveXOffset;
  static float s_fFieldOfView;
  static float s_fFarPlane;

  static float s_fOrthoLeft;
  static float s_fOrthoRight;
  static float s_fOrthoBottom;
  static float s_fOrthoTop;

  static bool s_bProjectionMatrixChanged;
  static bool s_bViewMatrixChanged;
  static int s_iViewportWidth;
  static int s_iViewportHeight;
  static bool s_bOrthagonal;
  static float s_fWidthOverHeight;

  static CFTTMatrix32 s_matProjRender;
  static CFTTMatrix32 s_matProjCanonical;
  static CFTTMatrix32 s_matView;

  static CFTTMatrix32 s_matViewProjRender;
  static CFTTMatrix32 s_matViewProjCanonical;

  static CFTTFrustum32 s_tFrustum;
  static CFTTSphere32 s_tFrustumBoundingSphere;
  static CFTTCone32 s_tFrustumBoundingCone;
  int field_00;
  int m_i_04;
  int m_i_08;
  int field_0C;

  TPoint3D m_pt3D_10;
  // int   m_fX_10;
  // int   m_fY_14;
  // int     m_iZ_18;

  TPoint3D m_pt3D_1C;
  // int   m_fX_1C;
  // int   m_fY_20;
  // int     m_iZ_24;

  TPoint3D m_pt3D_28;
  // int   m_fX_28;
  // int   m_fY_2C;
  // int     m_iZ_30;

  // int     field_34;
  uchar m_uc_34;
  uchar field_35[3];

  uchar field_38[0x8C];
  int m_i_C4;
};

#endif  //_CFTTCAMERA_H_