CommonLibSSE NG
ShadowSceneNode.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSAtomic.h"
4 #include "RE/B/BSTArray.h"
5 #include "RE/N/NiNode.h"
6 
7 namespace RE
8 {
9  class BSLight;
10  class BSFogProperty;
11  class BSLensFlareRenderData;
12  class BSPortalGraph;
13  class BSShadowLight;
14  class BSShadowDirectionalLight;
15 
16  class ShadowSceneNode : public NiNode
17  {
18  public:
19  inline static constexpr auto RTTI = RTTI_ShadowSceneNode;
20  inline static auto Ni_RTTI = NiRTTI_ShadowSceneNode;
21 
23  {
24  public:
25  // members
26  std::uint8_t unk00; // 00
27  std::uint8_t unk01; // 01
28  bool portalStrict; // 02
29  bool affectLand; // 03
30  std::uint8_t unk04; // 04
31  bool neverFades; // 05
32  float fov; // 08
33  float falloff; // 0C
34  float nearDistance; // 10
35  float depthBias; // 14
36  std::uint32_t unk18; // 18
39  };
40 
41  struct RUNTIME_DATA
42  {
43 #define RUNTIME_DATA_CONTENT \
44  std::uint64_t unk128; /* 128 */ \
45  BSTArray<NiPointer<BSLight>> activeLights; /* 130 */ \
46  BSTArray<NiPointer<BSLight>> unk148; /* 148 */ \
47  BSTArray<NiPointer<BSLight>> unk160; /* 160 */ \
48  BSTArray<void*> unk178; /* 178 */ \
49  BSTArray<NiPointer<BSLight>> unk190; /* 190 */ \
50  mutable BSSpinLock unk1A8; /* 1A8 */ \
51  BSTArray<NiPointer<NiAVObject>> geometries; /* 1B0 */ \
52  BSTArray<NiPointer<NiAVObject>> particleNodes; /* 1C8 */ \
53  BSTArray<NiPointer<NiAVObject>> actorRootNodes; /* 1E0 */ \
54  mutable BSSpinLock unk1F8; /* 1F8 */ \
55  BSLight* sunLight; /* 200 */ \
56  BSLight* cloudLight; /* 208 */ \
57  BSShadowDirectionalLight* shadowDirLight; /* 210 */ \
58  std::uint8_t unk218; /* 218 */ \
59  std::uint8_t unk219; /* 219 */ \
60  std::uint8_t unk21A; /* 21A */ \
61  std::uint8_t unk21B; /* 21B */ \
62  std::uint32_t pad21C; /* 21C */ \
63  NiPointer<BSFogProperty> fogProperty; /* 220 */ \
64  BSPortalGraph* portalGraph; /* 228 */ \
65  BSTArray<BSShadowLight*> shadowCasterLights; /* 230 */ \
66  std::uint64_t unk248; /* 248 */ \
67  std::uint64_t unk250; /* 250 */ \
68  std::uint64_t unk258; /* 258 */ \
69  std::uint64_t unk260; /* 260 */ \
70  std::uint64_t unk268; /* 268 */ \
71  std::uint64_t unk270; /* 270 */ \
72  std::uint64_t unk278; /* 278 */ \
73  std::uint64_t unk280; /* 280 */ \
74  std::uint64_t unk288; /* 288 */ \
75  std::uint64_t unk290; /* 290 */ \
76  std::uint64_t unk298; /* 298 */ \
77  std::uint64_t unk2A0; /* 2A0 */ \
78  std::uint64_t unk2A8; /* 2A8 */ \
79  std::uint64_t unk2B0; /* 2B0 */ \
80  std::uint64_t unk2B8; /* 2B8 */ \
81  std::uint64_t unk2C0; /* 2C0 */ \
82  std::uint64_t unk2C8; /* 2C8 */ \
83  std::uint64_t unk2D0; /* 2D0 */ \
84  std::uint64_t unk2D8; /* 2D8 */ \
85  std::uint64_t unk2E0; /* 2E0 */ \
86  NiPoint3 unk2E8; /* 2E8 */ \
87  NiPoint3 cameraPos; /* 2F4 */ \
88  std::uint8_t unk300; /* 300 */ \
89  std::uint8_t pad301; /* 301 */ \
90  std::uint16_t pad302; /* 302 */ \
91  float unk304; /* 304 */
92 
94  };
95  static_assert(sizeof(RUNTIME_DATA) == 0x1E0);
96 
97  ~ShadowSceneNode() override; // 00
98 
99  // override (NiNode)
100  const NiRTTI* GetRTTI() const override; // 02
101 #if !defined(ENABLE_SKYRIM_VR) || (!defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_VR))
102  // The following are virtual functions past the point where VR compatibility breaks.
103  void OnVisible(NiCullingProcess& a_process) override; // 34
104 #endif
105 
106  [[nodiscard]] inline RUNTIME_DATA& GetRuntimeData() noexcept
107  {
108  return REL::RelocateMember<RUNTIME_DATA>(this, 0x128, 0x150);
109  }
110 
111  [[nodiscard]] inline const RUNTIME_DATA& GetRuntimeData() const noexcept
112  {
113  return REL::RelocateMember<RUNTIME_DATA>(this, 0x128, 0x150);
114  }
115 
116  // members
117 #ifndef SKYRIM_CROSS_VR
118  RUNTIME_DATA_CONTENT // 128, 150
119 #endif
120  };
121 #ifndef ENABLE_SKYRIM_VR
122  static_assert(sizeof(ShadowSceneNode) == 0x308);
123 #elif !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)
124  static_assert(sizeof(ShadowSceneNode) == 0x330);
125 #endif
126 }
127 #undef RUNTIME_DATA_CONTENT
#define RUNTIME_DATA_CONTENT
Definition: ShadowSceneNode.h:43
Definition: BSLensFlareRenderData.h:11
Definition: NiAVObject.h:50
Definition: NiCullingProcess.h:34
Definition: NiNode.h:12
Definition: NiRTTI.h:6
Definition: ShadowSceneNode.h:17
const NiRTTI * GetRTTI() const override
RUNTIME_DATA & GetRuntimeData() noexcept
Definition: ShadowSceneNode.h:106
void OnVisible(NiCullingProcess &a_process) override
static auto Ni_RTTI
Definition: ShadowSceneNode.h:20
~ShadowSceneNode() override
static constexpr auto RTTI
Definition: ShadowSceneNode.h:19
const RUNTIME_DATA & GetRuntimeData() const noexcept
Definition: ShadowSceneNode.h:111
Definition: AbsorbEffect.h:6
constexpr REL::VariantID RTTI_ShadowSceneNode(692005, 400049, 0x1f7fa60)
constexpr REL::VariantID NiRTTI_ShadowSceneNode(527735, 414664, 0x3423520)
Definition: ShadowSceneNode.h:23
float nearDistance
Definition: ShadowSceneNode.h:34
float falloff
Definition: ShadowSceneNode.h:33
float depthBias
Definition: ShadowSceneNode.h:35
BSLensFlareRenderData * lensFlareData
Definition: ShadowSceneNode.h:38
std::uint8_t unk01
Definition: ShadowSceneNode.h:27
NiAVObject * objectNode
Definition: ShadowSceneNode.h:37
bool portalStrict
Definition: ShadowSceneNode.h:28
std::uint32_t unk18
Definition: ShadowSceneNode.h:36
bool affectLand
Definition: ShadowSceneNode.h:29
bool neverFades
Definition: ShadowSceneNode.h:31
std::uint8_t unk00
Definition: ShadowSceneNode.h:26
std::uint8_t unk04
Definition: ShadowSceneNode.h:30
float fov
Definition: ShadowSceneNode.h:32
Definition: ShadowSceneNode.h:42