CommonLibSSE NG
bhkWorld.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSAtomic.h"
4 #include "RE/B/bhkSerializable.h"
5 
6 namespace RE
7 {
8  struct bhkPickData;
9  class BGSAcousticSpaceListener;
10  class hkpSuspendInactiveAgentsUtil;
11  class NiAVObject;
12 
13  class bhkWorld : public bhkSerializable
14  {
15  public:
16  inline static constexpr auto RTTI = RTTI_bhkWorld;
17  inline static auto Ni_RTTI = NiRTTI_bhkWorld;
18  inline static constexpr auto VTABLE = VTABLE_bhkWorld;
19 
20  class bhkConstraintProjector;
21 
22  ~bhkWorld() override; // 00
23 
24  // override (bhkSerializable)
25  const NiRTTI* GetRTTI() const override; // 02
26  void SetReferencedObject(hkReferencedObject* a_object) override; // 25
27  void AdjustRefCount(bool a_increment) override; // 26
28  hkpWorld* GetWorld1() override; // 27 - { return referencedObject.ptr; }
29  ahkpWorld* GetWorld2() override; // 28 - { return referencedObject.ptr; }
30  void Unk_2B(void) override; // 2B
31  void Unk_2C(void) override; // 2C - { return 1; }
32  void Unk_2E(void) override; // 2E
33  void Unk_2F(void) override; // 2F
34 
35  // add
36  virtual void Unk_32(void); // 32
37  virtual bool PickObject(bhkPickData& a_pickData); // 33
38  virtual void Unk_34(void); // 34
39  virtual void Unk_35(void); // 35
40  virtual void InitHavok(NiAVObject* a_sceneObject, NiAVObject* a_root); // 36
41 
42  static float GetWorldScale()
43  {
44  REL::Relocation<float*> worldScale{ RELOCATION_ID(231896, 188105) };
45  return *worldScale;
46  }
47 
48  static float GetWorldScaleInverse()
49  {
50  REL::Relocation<float*> worldScaleInverse{ RELOCATION_ID(230692, 187407) };
51  return *worldScaleInverse;
52  }
53 
54  // members
55  std::uint8_t unk0020[0x320]; // 0020
56  std::uint8_t unk0340[0x6400]; // 0340
57  std::uint8_t unk6740[0x5DC0]; // 6740
62  std::uint64_t unkC560; // C560
63  std::uint32_t unkC568; // C568
64  float unkC56C; // C56C
65  bhkConstraintProjector* constraintProjector; // C570
66  std::uint64_t unkC578; // C578
67  std::uint32_t unkC580; // C580
68  float unkC584; // C584
69  std::uint64_t unkC588; // C588
70  std::uint64_t unkC590; // C590
71  mutable BSReadWriteLock worldLock; // C598
72  mutable BSReadWriteLock unkC5A0; // C5A0
73  std::uint64_t unkC5A8; // C5A8
74  hkVector4 unkC5B0; // C5B0
75  std::uint64_t unkC5C0; // C5C0
76  BGSAcousticSpaceListener* acousticSpaceListener; // C5C8
77  hkpSuspendInactiveAgentsUtil* suspendInactiveAgentsUtil; // C5D0
78  std::uint32_t unkC5D8; // C5D8 - incremented per frame
79  std::uint32_t unkC5DC; // C5DC
80  std::uint32_t unkC5E0; // C5E0
81  std::uint32_t unkC5E4; // C5E4
82  std::uint32_t unkC5E8; // C5E8
83  std::uint32_t unkC5EC; // C5EC
84  float tau; // C5F0
85  float damping; // C5F4
86  std::uint8_t unkC5F8; // C5F8
87  bool toggleCollision; // C5F9
88  std::uint16_t unkC5FA; // C5FA
89  std::uint16_t unkC5FC; // C5FC
90  std::uint16_t unkC5FE; // C5FE
91  };
92  static_assert(sizeof(bhkWorld) == 0xC600);
93 }
#define RELOCATION_ID(a_se, a_ae)
Definition: PCH.h:724
Definition: Relocation.h:204
Definition: BSAtomic.h:71
Definition: NiAVObject.h:50
Definition: NiRTTI.h:6
Definition: ahkpWorld.h:8
Definition: bhkSerializable.h:12
Definition: bhkWorld.h:14
static float GetWorldScale()
Definition: bhkWorld.h:42
void Unk_2F(void) override
virtual bool PickObject(bhkPickData &a_pickData)
static constexpr auto RTTI
Definition: bhkWorld.h:16
hkpWorld * GetWorld1() override
BSReadWriteLock unkC5A0
Definition: bhkWorld.h:72
BSReadWriteLock worldLock
Definition: bhkWorld.h:71
~bhkWorld() override
ahkpWorld * GetWorld2() override
float unkC56C
Definition: bhkWorld.h:64
void Unk_2E(void) override
const NiRTTI * GetRTTI() const override
float unkC584
Definition: bhkWorld.h:68
BSTArray< void * > unkC530
Definition: bhkWorld.h:60
void Unk_2C(void) override
hkpSuspendInactiveAgentsUtil * suspendInactiveAgentsUtil
Definition: bhkWorld.h:77
std::uint32_t unkC5D8
Definition: bhkWorld.h:78
virtual void Unk_34(void)
std::uint8_t unk6740[0x5DC0]
Definition: bhkWorld.h:57
std::uint32_t unkC5DC
Definition: bhkWorld.h:79
void Unk_2B(void) override
std::uint64_t unkC5C0
Definition: bhkWorld.h:75
BGSAcousticSpaceListener * acousticSpaceListener
Definition: bhkWorld.h:76
BSTArray< void * > unkC548
Definition: bhkWorld.h:61
static auto Ni_RTTI
Definition: bhkWorld.h:17
float damping
Definition: bhkWorld.h:85
std::uint32_t unkC5EC
Definition: bhkWorld.h:83
std::uint64_t unkC590
Definition: bhkWorld.h:70
std::uint32_t unkC5E8
Definition: bhkWorld.h:82
BSTArray< void * > unkC518
Definition: bhkWorld.h:59
virtual void Unk_32(void)
void AdjustRefCount(bool a_increment) override
std::uint8_t unkC5F8
Definition: bhkWorld.h:86
virtual void InitHavok(NiAVObject *a_sceneObject, NiAVObject *a_root)
std::uint32_t unkC568
Definition: bhkWorld.h:63
float tau
Definition: bhkWorld.h:84
virtual void Unk_35(void)
static constexpr auto VTABLE
Definition: bhkWorld.h:18
std::uint64_t unkC560
Definition: bhkWorld.h:62
std::uint32_t unkC5E4
Definition: bhkWorld.h:81
std::uint32_t unkC580
Definition: bhkWorld.h:67
std::uint64_t unkC578
Definition: bhkWorld.h:66
std::uint64_t unkC588
Definition: bhkWorld.h:69
BSTArray< void * > unkC500
Definition: bhkWorld.h:58
bool toggleCollision
Definition: bhkWorld.h:87
std::uint8_t unk0340[0x6400]
Definition: bhkWorld.h:56
bhkConstraintProjector * constraintProjector
Definition: bhkWorld.h:65
std::uint64_t unkC5A8
Definition: bhkWorld.h:73
std::uint16_t unkC5FE
Definition: bhkWorld.h:90
std::uint32_t unkC5E0
Definition: bhkWorld.h:80
static float GetWorldScaleInverse()
Definition: bhkWorld.h:48
void SetReferencedObject(hkReferencedObject *a_object) override
std::uint16_t unkC5FA
Definition: bhkWorld.h:88
hkVector4 unkC5B0
Definition: bhkWorld.h:74
std::uint16_t unkC5FC
Definition: bhkWorld.h:89
std::uint8_t unk0020[0x320]
Definition: bhkWorld.h:55
Definition: hkReferencedObject.h:11
Definition: hkVector4.h:9
Definition: hkpWorld.h:62
Definition: AbsorbEffect.h:6
constexpr REL::VariantID NiRTTI_bhkWorld(525051, 411527, 0x3186e18)
constexpr REL::VariantID RTTI_bhkWorld(690750, 398608, 0x1f669d8)
constexpr std::array< REL::VariantID, 1 > VTABLE_bhkWorld
Definition: Offsets_VTABLE.h:5857
Definition: bhkPickData.h:11