2016-04-27 00:26:02 +00:00
|
|
|
#ifndef __URDE_CWORLDLIGHT_HPP__
|
|
|
|
#define __URDE_CWORLDLIGHT_HPP__
|
2016-04-26 10:40:56 +00:00
|
|
|
|
|
|
|
#include "Graphics/CLight.hpp"
|
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
class CWorldLight
|
|
|
|
{
|
2017-01-21 15:46:51 +00:00
|
|
|
public:
|
|
|
|
enum class EWorldLightType
|
|
|
|
{
|
|
|
|
LocalAmbient,
|
|
|
|
Directional,
|
|
|
|
Custom,
|
|
|
|
Spot,
|
|
|
|
Spot2,
|
|
|
|
LocalAmbient2,
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
EWorldLightType x0_type = EWorldLightType::Spot2;
|
2016-04-26 10:40:56 +00:00
|
|
|
zeus::CVector3f x4_color;
|
|
|
|
zeus::CVector3f x10_position;
|
|
|
|
zeus::CVector3f x1c_direction;
|
|
|
|
float x28_q = 0.f;
|
|
|
|
float x2c_cutoffAngle = 0.f;
|
|
|
|
float x30_ = 0.f;
|
|
|
|
bool x34_castShadows = false;
|
|
|
|
float x38_ = 0.f;
|
|
|
|
EFalloffType x3c_falloff = EFalloffType::Linear;
|
|
|
|
float x40_ = 0.f;
|
|
|
|
public:
|
|
|
|
CWorldLight(const CWorldLight&) = default;
|
|
|
|
CWorldLight(CInputStream& in);
|
2017-10-01 04:26:46 +00:00
|
|
|
EWorldLightType GetLightType() const { return x0_type; }
|
|
|
|
const zeus::CVector3f& GetDirection() const { return x1c_direction; }
|
|
|
|
const zeus::CVector3f& GetPosition() const { return x10_position; }
|
2017-04-10 06:57:00 +00:00
|
|
|
bool DoesCastShadows() const { return x34_castShadows; }
|
2016-04-26 10:40:56 +00:00
|
|
|
|
|
|
|
CLight GetAsCGraphicsLight() const;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2016-04-27 00:26:02 +00:00
|
|
|
#endif // __URDE_CWORLDLIGHT_HPP__
|