CommonLibSSE NG
Loading...
Searching...
No Matches
hkpCollidable.h
Go to the documentation of this file.
1#pragma once
2
4#include "RE/H/hkpCdBody.h"
5#include "RE/H/hkpShape.h"
7
8namespace RE
9{
10 struct hkAabbUint32;
11
12 class hkpCollidable : public hkpCdBody
13 {
14 public:
15 enum BelongsTo : std::uint32_t
16 {
17 kTerrain = 1 << 16
18 };
19
20 enum CollisionFilterInfo : std::uint32_t
21 {
22 kBelongsTo = 0xFFFF0000,
23 kCollidesWith = 0x0000FFFF
24 };
25
27 {
28 kUserRequest = 1 << 0,
29 kShapeRequest = 1 << 1,
30 kModifierRequest = 1 << 2,
31 kShapeUnchecked = 1 << 3
32 };
33
35 {
36 public:
37 // members
38 std::uint32_t min[3]; // 00
39 std::uint8_t expansionMin[3]; // 0C
40 std::uint8_t expansionShift; // 0F
41 std::uint32_t max[3]; // 10
42 std::uint8_t expansionMax[3]; // 1C
43 std::uint8_t pad1F; // 1F
44 std::uint16_t numChildShapeAabbs; // 20
45 std::uint16_t capacityChildShapeAabbs; // 22
46 std::uint32_t pad24; // 24
47 hkAabbUint32* childShapeAabbs; // 28
49 };
50 static_assert(sizeof(BoundingVolumeData) == 0x38);
51
52 [[nodiscard]] COL_LAYER GetCollisionLayer() const
53 {
54 return static_cast<COL_LAYER>(broadPhaseHandle.collisionFilterInfo & 0x7F);
55 }
56
57 [[nodiscard]] void* GetOwner() const
58 {
59 return const_cast<void*>(stl::adjust_pointer<const void>(this, ownerOffset));
60 }
61
62 template <class T>
63 T* GetOwner() const
64 {
65 return static_cast<T*>(GetOwner());
66 }
67
68 // members
69 std::int8_t ownerOffset; // 20
70 std::uint8_t forceCollideOntoPpu; // 21
71 std::uint16_t shapeSizeOnSpu; // 22
75 std::uint32_t pad6C; // 6C
76 };
77 static_assert(sizeof(hkpCollidable) == 0x70);
78}
Definition hkpCdBody.h:8
Definition hkpCollidable.h:13
std::uint16_t shapeSizeOnSpu
Definition hkpCollidable.h:71
void * GetOwner() const
Definition hkpCollidable.h:57
CollisionFilterInfo
Definition hkpCollidable.h:21
@ kCollidesWith
Definition hkpCollidable.h:23
@ kBelongsTo
Definition hkpCollidable.h:22
COL_LAYER GetCollisionLayer() const
Definition hkpCollidable.h:52
float allowedPenetrationDepth
Definition hkpCollidable.h:74
hkpTypedBroadPhaseHandle broadPhaseHandle
Definition hkpCollidable.h:72
std::uint32_t pad6C
Definition hkpCollidable.h:75
ForceCollideOntoPpuReasons
Definition hkpCollidable.h:27
BoundingVolumeData boundingVolumeData
Definition hkpCollidable.h:73
std::int8_t ownerOffset
Definition hkpCollidable.h:69
T * GetOwner() const
Definition hkpCollidable.h:63
BelongsTo
Definition hkpCollidable.h:16
@ kTerrain
Definition hkpCollidable.h:17
std::uint8_t forceCollideOntoPpu
Definition hkpCollidable.h:70
Definition hkpTypedBroadPhaseHandle.h:8
std::uint32_t collisionFilterInfo
Definition hkpTypedBroadPhaseHandle.h:19
Definition AbsorbEffect.h:6
COL_LAYER
Definition CollisionLayers.h:6
std::uint32_t hkpShapeKey
Definition hkpContactPointEvent.h:12
Definition hkpCollidable.h:35
std::uint8_t expansionShift
Definition hkpCollidable.h:40
std::uint32_t min[3]
Definition hkpCollidable.h:38
std::uint8_t expansionMax[3]
Definition hkpCollidable.h:42
std::uint8_t expansionMin[3]
Definition hkpCollidable.h:39
std::uint32_t pad24
Definition hkpCollidable.h:46
std::uint16_t numChildShapeAabbs
Definition hkpCollidable.h:44
std::uint32_t max[3]
Definition hkpCollidable.h:41
hkAabbUint32 * childShapeAabbs
Definition hkpCollidable.h:47
std::uint16_t capacityChildShapeAabbs
Definition hkpCollidable.h:45
hkpShapeKey * childShapeKeys
Definition hkpCollidable.h:48
std::uint8_t pad1F
Definition hkpCollidable.h:43