CommonLibSSE NG
BSMultiBoundNode.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include "RE/B/BSNiNode.h"
5 #include "RE/N/NiSmartPointer.h"
6 
7 namespace RE
8 {
9  class BSMultiBound;
10  class BSMultiBoundRoom;
11  class NiPoint3;
12 
13  class BSMultiBoundNode : public BSNiNode
14  {
15  public:
16  inline static constexpr auto RTTI = RTTI_BSMultiBoundNode;
17  inline static auto Ni_RTTI = NiRTTI_BSMultiBoundNode;
18 
19  struct RUNTIME_DATA
20  {
21 #define RUNTIME_DATA_CONTENT \
22  NiPointer<BSMultiBound> multiBound; /* 00 */ \
23  BSCullingProcess::BSCPCullingType cullingMode; /* 08 */ \
24  float lastAccumTime; /* 0C */
25 
27  };
28  static_assert(sizeof(RUNTIME_DATA) == 0x10);
29 
30  ~BSMultiBoundNode() override; // 00
31 
32  // override (BSNiNode)
33  const NiRTTI* GetRTTI() const override; // 02
34  BSMultiBoundNode* AsMultiBoundNode() override; // 06 - { return this; }
35  NiObject* CreateClone(NiCloningProcess& a_cloning) override; // 17
36  void LoadBinary(NiStream& a_stream) override; // 18
37  void LinkObject(NiStream& a_stream) override; // 19
38  bool RegisterStreamables(NiStream& a_stream) override; // 1A
39  void SaveBinary(NiStream& a_stream) override; // 1B
40  bool IsEqual(NiObject* a_object) override; // 1C
41 #if !defined(ENABLE_SKYRIM_VR) || (!defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_VR))
42  // The following are virtual functions past the point where VR compatibility breaks.
43  void UpdateDownwardPass(NiUpdateData& a_data, std::uint32_t a_arg2) override; // 2C
44  void UpdateWorldBound() override; // 2F
45  void OnVisible(NiCullingProcess& a_process) override; // 34
46  void UpdateUpwardPass(NiUpdateData& a_data) override; // 3D
47 #endif
48 
49  // add
50  SKYRIM_REL_VR_VIRTUAL BSMultiBoundRoom* GetMultiBoundRoom(); // 3E - { return 0; }
51  SKYRIM_REL_VR_VIRTUAL bool QPointWithin(const NiPoint3& a_point); // 3F
52  SKYRIM_REL_VR_VIRTUAL void Unk_40(void); // 40
53  SKYRIM_REL_VR_VIRTUAL void Unk_41(void); // 41
54 
55  [[nodiscard]] inline RUNTIME_DATA& GetRuntimeData() noexcept
56  {
57  return REL::RelocateMember<RUNTIME_DATA>(this, 0x128, 0x150);
58  }
59 
60  [[nodiscard]] inline const RUNTIME_DATA& GetRuntimeData() const noexcept
61  {
62  return REL::RelocateMember<RUNTIME_DATA>(this, 0x128, 0x150);
63  }
64 
65  // members
66 #ifndef SKYRIM_CROSS_VR
67  RUNTIME_DATA_CONTENT // 128, 150
68 #endif
69  };
70 #ifndef ENABLE_SKYRIM_VR
71  static_assert(sizeof(BSMultiBoundNode) == 0x138);
72 #elif !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)
73  static_assert(sizeof(BSMultiBoundNode) == 0x160);
74 #endif
75 }
76 #undef RUNTIME_DATA_CONTENT
#define RUNTIME_DATA_CONTENT
Definition: BSMultiBoundNode.h:21
#define SKYRIM_REL_VR_VIRTUAL
Definition: Common.h:94
Definition: BSMultiBoundNode.h:14
bool IsEqual(NiObject *a_object) override
const NiRTTI * GetRTTI() const override
void UpdateWorldBound() override
~BSMultiBoundNode() override
void LinkObject(NiStream &a_stream) override
SKYRIM_REL_VR_VIRTUAL void Unk_40(void)
SKYRIM_REL_VR_VIRTUAL BSMultiBoundRoom * GetMultiBoundRoom()
BSMultiBoundNode * AsMultiBoundNode() override
SKYRIM_REL_VR_VIRTUAL bool QPointWithin(const NiPoint3 &a_point)
static auto Ni_RTTI
Definition: BSMultiBoundNode.h:17
void LoadBinary(NiStream &a_stream) override
const RUNTIME_DATA & GetRuntimeData() const noexcept
Definition: BSMultiBoundNode.h:60
RUNTIME_DATA & GetRuntimeData() noexcept
Definition: BSMultiBoundNode.h:55
NiObject * CreateClone(NiCloningProcess &a_cloning) override
void UpdateDownwardPass(NiUpdateData &a_data, std::uint32_t a_arg2) override
void UpdateUpwardPass(NiUpdateData &a_data) override
void OnVisible(NiCullingProcess &a_process) override
bool RegisterStreamables(NiStream &a_stream) override
void SaveBinary(NiStream &a_stream) override
SKYRIM_REL_VR_VIRTUAL void Unk_41(void)
static constexpr auto RTTI
Definition: BSMultiBoundNode.h:16
Definition: BSNiNode.h:8
Definition: NiCloningProcess.h:10
Definition: NiCullingProcess.h:34
Definition: NiObject.h:37
Definition: NiPoint3.h:6
Definition: NiRTTI.h:6
Definition: NiStream.h:29
Definition: NiAVObject.h:25
Definition: AbsorbEffect.h:6
constexpr REL::VariantID RTTI_BSMultiBoundNode(690672, 398527, 0x1f654b8)
constexpr REL::VariantID NiRTTI_BSMultiBoundNode(524676, 411291, 0x317cbb0)
Definition: BSMultiBoundNode.h:20