CommonLibVR
hkpWorldObject.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/H/hkArray.h"
6 #include "RE/H/hkStringPtr.h"
8 #include "RE/H/hkpProperty.h"
9 
10 namespace RE
11 {
12  class hkMotionState;
13  class hkpCollidable;
14  class hkpShapeModifier;
15  class hkpWorld;
16  class TESObjectREFR;
17 
18  namespace hkWorldOperation
19  {
20  enum class Result
21  {
22  kPostponed,
23  kDone
24  };
25  }
26 
28  {
29  public:
30  inline static constexpr auto RTTI = RTTI_hkpWorldObject;
31  inline static constexpr auto VTABLE = VTABLE_hkpWorldObject;
32 
34  {
35  kEnable,
36  kIgnore
37  };
38 
39  enum class BroadPhaseType
40  {
41  kInvalid,
42  kEntity,
43  kPhantom,
45 
46  kTotal
47  };
48 
49  ~hkpWorldObject() override; // 00
50 
51  // override (hkReferencedObject)
52  void CalcContentStatistics(hkStatisticsCollector* a_collector, const hkClass* a_class) const override; // 02
53 
54  // add
55  virtual hkWorldOperation::Result SetShape(const hkpShape* a_shape); // 03 - { return hkWorldOperation::Result::kDone; }
56  virtual hkWorldOperation::Result UpdateShape(hkpShapeModifier* a_shapeModifier); // 04 - { return hkWorldOperation::Result::kDone; }
57  virtual hkMotionState* GetMotionState() = 0; // 05
58 
59  const hkpCollidable* GetCollidable() const;
61  std::optional<hkpProperty> GetProperty(std::uint32_t a_key);
62  const hkpShape* GetShape() const;
64  bool HasProperty(std::uint32_t a_key);
65  void RemoveProperty(std::uint32_t a_key);
66  void SetProperty(std::uint32_t a_key, hkpPropertyValue a_value);
67 
68  // members
69  hkpWorld* world; // 10
70  std::uint64_t userData; // 18 - bhkWorldObject*?
73  std::uint32_t padAC; // AC
76  void* treeData; // C8
77  private:
78  KEEP_FOR_RE()
79  };
80  static_assert(sizeof(hkpWorldObject) == 0xD0);
81 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: TESObjectREFR.h:113
Definition: hkArray.h:190
Definition: hkMotionState.h:11
Definition: hkMultiThreadCheck.h:6
Definition: hkReferencedObject.h:11
Definition: hkStringPtr.h:6
Definition: hkpCollidable.h:13
Definition: hkpLinkedCollidable.h:11
Definition: hkpShape.h:32
Definition: hkpWorldObject.h:28
virtual hkMotionState * GetMotionState()=0
TESObjectREFR * GetUserData() const
static constexpr auto RTTI
Definition: hkpWorldObject.h:30
std::uint32_t padAC
Definition: hkpWorldObject.h:73
void SetProperty(std::uint32_t a_key, hkpPropertyValue a_value)
hkMultiThreadCheck multiThreadCheck
Definition: hkpWorldObject.h:72
bool HasProperty(std::uint32_t a_key)
void CalcContentStatistics(hkStatisticsCollector *a_collector, const hkClass *a_class) const override
hkpLinkedCollidable collidable
Definition: hkpWorldObject.h:71
virtual hkWorldOperation::Result UpdateShape(hkpShapeModifier *a_shapeModifier)
const hkpCollidable * GetCollidable() const
~hkpWorldObject() override
std::optional< hkpProperty > GetProperty(std::uint32_t a_key)
hkpCollidable * GetCollidableRW()
hkStringPtr name
Definition: hkpWorldObject.h:74
static constexpr auto VTABLE
Definition: hkpWorldObject.h:31
hkpWorld * world
Definition: hkpWorldObject.h:69
BroadPhaseType
Definition: hkpWorldObject.h:40
const hkpShape * GetShape() const
void RemoveProperty(std::uint32_t a_key)
void * treeData
Definition: hkpWorldObject.h:76
hkArray< hkpProperty > properties
Definition: hkpWorldObject.h:75
virtual hkWorldOperation::Result SetShape(const hkpShape *a_shape)
MultiThreadingChecks
Definition: hkpWorldObject.h:34
std::uint64_t userData
Definition: hkpWorldObject.h:70
Definition: hkpWorld.h:62
Result
Definition: hkpWorldObject.h:21
Definition: AbsorbEffect.h:6
constexpr std::array< REL::ID, 1 > VTABLE_hkpWorldObject
Definition: Offsets_VTABLE.h:14423
constexpr REL::ID RTTI_hkpWorldObject(static_cast< std::uint64_t >(686314))
Definition: hkpProperty.h:6