2016-03-10 03:47:37 +00:00
|
|
|
#ifndef __URDE_CGUILIGHT_HPP__
|
|
|
|
#define __URDE_CGUILIGHT_HPP__
|
|
|
|
|
|
|
|
#include "CGuiWidget.hpp"
|
2016-03-12 04:58:56 +00:00
|
|
|
#include "Graphics/CLight.hpp"
|
2016-03-10 03:47:37 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
2017-01-22 01:40:12 +00:00
|
|
|
class CSimplePool;
|
2016-03-10 03:47:37 +00:00
|
|
|
|
2016-03-12 04:58:56 +00:00
|
|
|
class CGuiLight : public CGuiWidget
|
|
|
|
{
|
2017-04-08 20:40:36 +00:00
|
|
|
ELightType xb8_type;
|
|
|
|
float xbc_spotCutoff;
|
|
|
|
float xc0_distC;
|
|
|
|
float xc4_distL;
|
|
|
|
float xc8_distQ;
|
|
|
|
float xcc_angleC;
|
|
|
|
float xd0_angleL;
|
|
|
|
float xd4_angleQ;
|
|
|
|
u32 xd8_loadedIdx;
|
2017-04-13 19:28:31 +00:00
|
|
|
zeus::CColor xdc_ambColor = zeus::CColor::skBlack;
|
2016-03-12 04:58:56 +00:00
|
|
|
public:
|
2016-03-16 20:49:35 +00:00
|
|
|
~CGuiLight();
|
2016-03-12 04:58:56 +00:00
|
|
|
CGuiLight(const CGuiWidgetParms& parms, const CLight& light);
|
2017-01-29 03:58:16 +00:00
|
|
|
FourCC GetWidgetTypeID() const { return FOURCC('LITE'); }
|
2016-03-15 04:55:57 +00:00
|
|
|
|
|
|
|
CLight BuildLight() const;
|
2016-03-16 20:49:35 +00:00
|
|
|
void SetIsVisible(bool vis);
|
2017-04-08 20:40:36 +00:00
|
|
|
u32 GetLoadedIdx() const {return xd8_loadedIdx;}
|
2017-04-13 19:28:31 +00:00
|
|
|
const zeus::CColor& GetAmbientLightColor() const {return xdc_ambColor;}
|
2017-04-08 20:40:36 +00:00
|
|
|
void SetSpotCutoff(float v) {xbc_spotCutoff = v;}
|
|
|
|
void SetDistC(float v) {xc0_distC = v;}
|
|
|
|
void SetDistL(float v) {xc4_distL = v;}
|
|
|
|
void SetDistQ(float v) {xc8_distQ = v;}
|
|
|
|
void SetAngleC(float v) {xcc_angleC = v;}
|
|
|
|
void SetAngleL(float v) {xd0_angleL = v;}
|
|
|
|
void SetAngleQ(float v) {xd4_angleQ = v;}
|
|
|
|
void SetLoadedIdx(u32 idx) {xd8_loadedIdx = idx;}
|
2017-04-13 19:28:31 +00:00
|
|
|
void SetAmbientLightColor(const zeus::CColor& color) {xdc_ambColor = color;}
|
2016-03-15 04:55:57 +00:00
|
|
|
|
2017-01-22 01:40:12 +00:00
|
|
|
static std::shared_ptr<CGuiWidget> Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp);
|
|
|
|
|
|
|
|
std::shared_ptr<CGuiLight> shared_from_this()
|
|
|
|
{ return std::static_pointer_cast<CGuiLight>(CGuiObject::shared_from_this()); }
|
2016-03-12 04:58:56 +00:00
|
|
|
};
|
2016-03-10 03:47:37 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CGUILIGHT_HPP__
|