metaforce/Runtime/World/CWorldLight.hpp

49 lines
1.2 KiB
C++
Raw Permalink Normal View History

2018-10-06 20:42:33 -07:00
#pragma once
2016-04-26 03:40:56 -07:00
#include "Runtime/Graphics/CLight.hpp"
#include <zeus/CVector3f.hpp>
2016-04-26 03:40:56 -07:00
2021-04-10 01:42:06 -07:00
namespace metaforce {
2018-12-07 21:30:43 -08:00
class CWorldLight {
2017-01-21 07:46:51 -08:00
public:
2018-12-07 21:30:43 -08:00
enum class EWorldLightType {
LocalAmbient,
Directional,
Custom,
Spot,
Spot2,
LocalAmbient2,
};
2017-01-21 07:46:51 -08:00
private:
2018-12-07 21:30:43 -08:00
EWorldLightType x0_type = EWorldLightType::Spot2;
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;
2016-04-26 03:40:56 -07:00
public:
explicit CWorldLight(CInputStream& in);
CWorldLight(const CWorldLight&) = default;
CWorldLight& operator=(const CWorldLight&) = default;
CWorldLight(CWorldLight&&) = default;
CWorldLight& operator=(CWorldLight&&) = default;
2018-12-07 21:30:43 -08:00
EWorldLightType GetLightType() const { return x0_type; }
const zeus::CVector3f& GetDirection() const { return x1c_direction; }
const zeus::CVector3f& GetPosition() const { return x10_position; }
bool DoesCastShadows() const { return x34_castShadows; }
2016-04-26 03:40:56 -07:00
2018-12-07 21:30:43 -08:00
CLight GetAsCGraphicsLight() const;
2016-04-26 03:40:56 -07:00
};
2021-04-10 01:42:06 -07:00
} // namespace metaforce