CommonLibSSE NG
NiPointLight.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/N/NiLight.h"
4 
5 namespace RE
6 {
7  class NiPointLight : public NiLight
8  {
9  public:
10  inline static constexpr auto RTTI = RTTI_NiPointLight;
11  inline static auto Ni_RTTI = NiRTTI_NiPointLight;
12 
14  {
15 #define RUNTIME_DATA_CONTENT \
16  float constAttenuation; /* 00 */ \
17  float linearAttenuation; /* 04 */ \
18  float quadraticAttenuation; /* 08 */
19 
21  };
22  static_assert(sizeof(POINT_LIGHT_RUNTIME_DATA) == 0x0C);
23 
24  ~NiPointLight() override; // 00
25 
26  // override (NiLight)
27  const NiRTTI* GetRTTI() const override; // 02
28  NiObject* CreateClone(NiCloningProcess& a_cloning) override; // 17
29  void LoadBinary(NiStream& a_stream) override; // 18
30  void SaveBinary(NiStream& a_stream) override; // 1B
31  bool IsEqual(NiObject* a_object) override; // 1C
32 
33  [[nodiscard]] inline POINT_LIGHT_RUNTIME_DATA& GetPointLightRuntimeData() noexcept
34  {
35  return REL::RelocateMember<POINT_LIGHT_RUNTIME_DATA>(this, 0x140, 0x168);
36  }
37 
38  [[nodiscard]] inline const POINT_LIGHT_RUNTIME_DATA& GetPointLightRuntimeData() const noexcept
39  {
40  return REL::RelocateMember<POINT_LIGHT_RUNTIME_DATA>(this, 0x140, 0x168);
41  }
42 
43  // members
44 #ifndef SKYRIM_CROSS_VR
45  RUNTIME_DATA_CONTENT // 140, 168
46 #endif
47  };
48 #ifndef ENABLE_SKYRIM_VR
49  static_assert(sizeof(NiPointLight) == 0x150);
50 #elif !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)
51  static_assert(sizeof(NiPointLight) == 0x178);
52 #endif
53 }
54 #undef RUNTIME_DATA_CONTENT
#define RUNTIME_DATA_CONTENT
Definition: NiPointLight.h:15
Definition: NiCloningProcess.h:10
Definition: NiLight.h:10
Definition: NiObject.h:37
Definition: NiPointLight.h:8
bool IsEqual(NiObject *a_object) override
static constexpr auto RTTI
Definition: NiPointLight.h:10
POINT_LIGHT_RUNTIME_DATA & GetPointLightRuntimeData() noexcept
Definition: NiPointLight.h:33
~NiPointLight() override
void SaveBinary(NiStream &a_stream) override
NiObject * CreateClone(NiCloningProcess &a_cloning) override
const POINT_LIGHT_RUNTIME_DATA & GetPointLightRuntimeData() const noexcept
Definition: NiPointLight.h:38
const NiRTTI * GetRTTI() const override
void LoadBinary(NiStream &a_stream) override
static auto Ni_RTTI
Definition: NiPointLight.h:11
Definition: NiRTTI.h:6
Definition: NiStream.h:29
Definition: AbsorbEffect.h:6
constexpr REL::VariantID RTTI_NiPointLight(690433, 398288, 0x1f62020)
constexpr REL::VariantID NiRTTI_NiPointLight(523954, 410534, 0x316bef0)
Definition: NiPointLight.h:14