CommonLibSSE (Parapets fork)
hkpCollidable.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/H/hkpCdBody.h"
4 #include "RE/H/hkpShape.h"
6 
7 namespace RE
8 {
9  struct hkAabbUint32;
10 
11  class hkpCollidable : public hkpCdBody
12  {
13  public:
15  {
16  kUserRequest = 1 << 0,
17  kShapeRequest = 1 << 1,
18  kModifierRequest = 1 << 2,
19  kShapeUnchecked = 1 << 3
20  };
21 
23  {
24  public:
25  // members
26  std::uint32_t min[3]; // 00
27  std::uint8_t expansionMin[3]; // 0C
28  std::uint8_t expansionShift; // 0F
29  std::uint32_t max[3]; // 10
30  std::uint8_t expansionMax[3]; // 1C
31  std::uint8_t pad1F; // 1F
32  std::uint16_t numChildShapeAabbs; // 20
33  std::uint16_t capacityChildShapeAabbs; // 22
34  std::uint32_t pad24; // 24
35  hkAabbUint32* childShapeAabbs; // 28
37  };
38  static_assert(sizeof(BoundingVolumeData) == 0x38);
39 
40  [[nodiscard]] void* GetOwner() const
41  {
42  return const_cast<void*>(stl::adjust_pointer<const void>(this, ownerOffset));
43  }
44 
45  template <class T>
46  T* GetOwner() const
47  {
48  return static_cast<T*>(GetOwner());
49  }
50 
51  // members
52  std::int8_t ownerOffset; // 20
53  std::uint8_t forceCollideOntoPpu; // 21
54  std::uint16_t shapeSizeOnSpu; // 22
58  std::uint32_t pad6C; // 6C
59  };
60  static_assert(sizeof(hkpCollidable) == 0x70);
61 }
Definition: hkpCdBody.h:8
Definition: hkpCollidable.h:12
std::uint16_t shapeSizeOnSpu
Definition: hkpCollidable.h:54
float allowedPenetrationDepth
Definition: hkpCollidable.h:57
hkpTypedBroadPhaseHandle broadPhaseHandle
Definition: hkpCollidable.h:55
std::uint32_t pad6C
Definition: hkpCollidable.h:58
void * GetOwner() const
Definition: hkpCollidable.h:40
ForceCollideOntoPpuReasons
Definition: hkpCollidable.h:15
T * GetOwner() const
Definition: hkpCollidable.h:46
BoundingVolumeData boundingVolumeData
Definition: hkpCollidable.h:56
std::int8_t ownerOffset
Definition: hkpCollidable.h:52
std::uint8_t forceCollideOntoPpu
Definition: hkpCollidable.h:53
Definition: hkpTypedBroadPhaseHandle.h:8
Definition: AbsorbEffect.h:6
std::uint32_t hkpShapeKey
Definition: hkpShape.h:27
Definition: hkpCollidable.h:23
std::uint8_t expansionShift
Definition: hkpCollidable.h:28
std::uint32_t min[3]
Definition: hkpCollidable.h:26
std::uint8_t expansionMax[3]
Definition: hkpCollidable.h:30
std::uint8_t expansionMin[3]
Definition: hkpCollidable.h:27
std::uint32_t pad24
Definition: hkpCollidable.h:34
std::uint16_t numChildShapeAabbs
Definition: hkpCollidable.h:32
std::uint32_t max[3]
Definition: hkpCollidable.h:29
hkAabbUint32 * childShapeAabbs
Definition: hkpCollidable.h:35
std::uint16_t capacityChildShapeAabbs
Definition: hkpCollidable.h:33
hkpShapeKey * childShapeKeys
Definition: hkpCollidable.h:36
std::uint8_t pad1F
Definition: hkpCollidable.h:31