//CGfxFloodLights - [2020-04-13 11:57:46]
#ifndef _CGFXFLOODLIGHTS_H_
#define _CGFXFLOODLIGHTS_H_

#include "CFTTGraph.h"
#include "CFTTModel.h"
#include "CFTTAABB32.h"

/*
001AE544 CGfxFloodLights::Init()
001AE568 CGfxFloodLights::AddFloodLights(CFTTModel const*,CFTTMatrix32 const*)
001AEB78 CGfxFloodLights::Cluster()
001AEE18 CGfxFloodLights::Shutdown()
001AEED8 CGfxFloodLights::Render(bool,float)
001AF200 CGfxFloodLights::Visible(float)
001AF494 CGfxFloodLights::RenderCluster(float)
001AF688 CGfxFloodLights::RenderEnvCluster(float)
001AF8F0 CGfxFloodLights::ClusterColors(float)
001AFEE4 CGfxFloodLights::Update()
001AFF50 CGfxFloodLights::RenderOld()
001B0310 CGfxFloodLights::RenderDebug()

*/

//size 0x18
struct Lights_Sub {
  CFTTVector32 *vec32_0; //001AE654
  CFTTVector32 *vec32_4; //001AE670
  int field_8;           //未知，凑数用
  ushort field_c;        //vec32_0和vec32_4的count
  float field_10;
  float field_14;
};

//size 0x30
struct Lights {
  Lights_Sub field_0[2];
};

//size 0x58
struct ClusterInfo {
  CFTTVector32 vec32_0;
  CFTTVector32 vec32_c; //001AFA1A + 001AFA92确定就是CFTTVector32
  CFTTAABB32 field_18; //001AFC06
  bool field_4c; //001AF4F4
  char field_4d; //001AFAB8 + 001AFBA2就是byte
  float field_50;
  int field_54; //未知，凑数用
};

class CGfxFloodLights {
public:
  static void Init();                                                  //001AE544
  static void AddFloodLights(CFTTModel const *, CFTTMatrix32 const *); //001AE568
  static void Cluster();                                               //001AEB78
  static void Shutdown();                                              //001AEE18
  static void Render(bool, float);                                     //001AEED8
  static bool Visible(float);                                          //001AF200
  static void RenderCluster(float);                                    //001AF494
  static void RenderEnvCluster(float);                                 //001AF688
  static void ClusterColors(float);                                    //001AF8F0
  static void Update();                                                //001AFEE4
  static void RenderOld();                                             //001AFF50
  static void RenderDebug();                                           //001B0310

  static Lights ms_Lights;      //00475FF8
  static ClusterInfo *ms_Clusters;  //00476028 从001AEB98发现，结构体的count是ms_Lights.Lights_Sub[1].field_c
  static uint ms_uClusterCount; //0047602C 从001AEC54发现该变量是ms_Clusters的count
  static CFTTGraph* ms_pcGraph; //00476030
};

#endif //_CGFXFLOODLIGHTS_H_