CommonLibSSE (Parapets fork)
hkp3AxisSweep.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/H/hkAabb.h"
4 #include "RE/H/hkArray.h"
5 #include "RE/H/hkVector4.h"
6 #include "RE/H/hkpBroadPhase.h"
7 
8 namespace RE
9 {
10  class hkpBroadPhaseHandle;
11 
13  {
14  public:
15  inline static constexpr auto RTTI = RTTI_hkp3AxisSweep;
16 
17  using BpInt = std::uint16_t;
18 
19  enum class MarkerHandling
20  {
22  kIgnore,
24  };
25 
27  {
28  public:
29  // members
31  BpInt value; // 02
32  std::uint32_t pad04; // 04
34  };
35  static_assert(sizeof(hkpBpMarker) == 0x18);
36 
37  class hkpBpNode
38  {
39  public:
40  // members
41  BpInt minY; // 00
42  BpInt minZ; // 02
43  BpInt maxY; // 04
44  BpInt maxZ; // 06
45  BpInt minX; // 08
46  BpInt maxX; // 0A
47  std::uint32_t pad0C; // 0C
49  };
50  static_assert(sizeof(hkpBpNode) == 0x18);
51 
53  {
54  public:
55  // members
56  BpInt value; // 0
58  };
59  static_assert(sizeof(hkpBpEndPoint) == 0x4);
60 
61  class hkpBpAxis
62  {
63  public:
64  // members
66  };
67  static_assert(sizeof(hkpBpAxis) == 0x10);
68 
69  ~hkp3AxisSweep() override; // 00
70 
71  // override (hkpBroadPhase)
72  void CalcContentStatistics(hkStatisticsCollector* a_collector, const hkClass* a_class) const override; // 02
73  BroadPhaseType GetType() const override; // 03
74  void AddObject1(hkpBroadPhaseHandle* a_object, const hkAabbUint32& a_aabb, hkArray<hkpBroadPhaseHandlePair>& a_pairsOut) override; // 05
75  void AddObject2(hkpBroadPhaseHandle* a_object, const hkAabb& a_aabb, hkArray<hkpBroadPhaseHandlePair>& a_pairsOut) override; // 06
76  void AddObjectBatch(const hkArrayBase<hkpBroadPhaseHandle*>& a_addObjectList, const hkArrayBase<hkAabb>& a_addAabbList, hkArray<hkpBroadPhaseHandlePair>& a_newPairs) override; // 07
77  void RemoveObject(hkpBroadPhaseHandle* a_object, hkArray<hkpBroadPhaseHandlePair>& a_pairsOut) override; // 08
78  void RemoveObjectBatch(const hkArrayBase<hkpBroadPhaseHandle*>& a_removeObjectList, hkArray<hkpBroadPhaseHandlePair>& a_delPairsOut) override; // 09
79  std::int32_t GetNumObjects() const override; // 0A
80  void UpdateAabbs(hkpBroadPhaseHandle* a_objects[], const hkAabb* a_aabbs, std::int32_t a_numObjects, hkArray<hkpBroadPhaseHandlePair>& a_addedPairs, hkArray<hkpBroadPhaseHandlePair>& a_removedPairs) override; // 0B
81  void UpdateAabbsUInt32(hkpBroadPhaseHandle* a_objects[], const hkAabbUint32* a_aabbs, std::int32_t a_numObjects, hkArray<hkpBroadPhaseHandlePair>& a_addedPairs, hkArray<hkpBroadPhaseHandlePair>& a_removedPairs) override; // 0C
82  void Defragment() override; // 0D
83  void CheckDeterminism() override; // 0E - { return; }
84  void GetAllAabbs(hkArray<hkAabb>& a_allAabbs) const override; // 0F
85  void GetAabb(const hkpBroadPhaseHandle* a_object, hkAabb& a_aabb) const override; // 10
86  void GetExtents(hkVector4& a_worldMinOut, hkVector4& a_worldMaxOut) const override; // 11
87  void QuerySingleAabb(const hkAabb& a_aabb, hkArray<hkpBroadPhaseHandlePair>& a_pairsOut) const override; // 12
88  void ReQuerySingleObject(const hkpBroadPhaseHandle* a_object, hkArray<hkpBroadPhaseHandlePair>& a_pairsOut) const override; // 13
89  void QuerySingleAabbWithCollector(const hkAabb& a_aabb, hkpBroadPhaseCastCollector* a_collector) const override; // 14
90  bool AreAabbsOverlapping(const hkpBroadPhaseHandle* a_bhA, const hkpBroadPhaseHandle* a_bhB) const override; // 15
91  void ShiftAllObjects(const hkVector4& a_shiftDistance, hkVector4& a_effectiveShiftDistanceOut, hkArray<hkpBroadPhaseHandlePair>& a_newCollisionPairs) override; // 16
92  void ShiftBroadPhase(const hkVector4& a_shiftDistance, hkVector4& a_effectiveShiftDistanceOut, hkArray<hkpBroadPhaseHandlePair>& a_newCollisionPairs) override; // 17
93  void GetOffsetLowHigh32bit(hkVector4& a_offsetLow32bit, hkVector4& a_offsetHigh32bit) const override; // 18
94  void CastRay(const hkpCastRayInput& a_input, hkpBroadPhaseCastCollector* a_collectorBase, std::int32_t a_collectorStriding) const override; // 19
95  std::int32_t GetAabbCacheSize() const override; // 1A
96  void CalcAabbCache1(const hkAabb& a_aabb, hkpBroadPhaseAabbCache* a_aabbCacheOut) const override; // 1B
97  void CalcAabbCache2(const hkArrayBase<hkpCollidable*>& a_overlappingCollidables, hkpBroadPhaseAabbCache* a_aabbCacheOut) const override; // 1C
98  void CastAabb(const hkpCastAabbInput& a_input, hkpBroadPhaseCastCollector& a_collector) const override; // 1D
99  void Set32BitOffsetAndScale(const hkVector4& a_offsetLow, const hkVector4& a_offsetHigh, const hkVector4& a_scale) override; // 1E
100 
101  // members
102  hkAabb aabb; // 030
105  hkVector4 scale; // 070
110  hkpBpAxis axis[3]; // 0C0
111  std::int32_t numMarkers; // 0F0
112  std::int32_t ld2NumMarkers; // 0F4
115  std::uint32_t pad104; // 104
116  std::uint64_t pad108; // 108
117  };
118  static_assert(sizeof(hkp3AxisSweep) == 0x110);
119 }
Definition: hkAabb.h:8
Definition: hkArray.h:9
Definition: hkVector4.h:8
Definition: hkp3AxisSweep.h:62
hkArray< hkpBpEndPoint > endPoints
Definition: hkp3AxisSweep.h:65
Definition: hkp3AxisSweep.h:53
BpInt value
Definition: hkp3AxisSweep.h:56
BpInt nodeIndex
Definition: hkp3AxisSweep.h:57
Definition: hkp3AxisSweep.h:27
BpInt nodeIndex
Definition: hkp3AxisSweep.h:30
std::uint32_t pad04
Definition: hkp3AxisSweep.h:32
hkArray< BpInt > overlappingObjects
Definition: hkp3AxisSweep.h:33
BpInt value
Definition: hkp3AxisSweep.h:31
Definition: hkp3AxisSweep.h:38
BpInt maxX
Definition: hkp3AxisSweep.h:46
BpInt maxY
Definition: hkp3AxisSweep.h:43
BpInt minX
Definition: hkp3AxisSweep.h:45
BpInt minY
Definition: hkp3AxisSweep.h:41
hkpBroadPhaseHandle * handle
Definition: hkp3AxisSweep.h:48
std::uint32_t pad0C
Definition: hkp3AxisSweep.h:47
BpInt minZ
Definition: hkp3AxisSweep.h:42
BpInt maxZ
Definition: hkp3AxisSweep.h:44
Definition: hkp3AxisSweep.h:13
hkVector4 offsetHigh32bit
Definition: hkp3AxisSweep.h:107
void Defragment() override
void RemoveObjectBatch(const hkArrayBase< hkpBroadPhaseHandle * > &a_removeObjectList, hkArray< hkpBroadPhaseHandlePair > &a_delPairsOut) override
void CastAabb(const hkpCastAabbInput &a_input, hkpBroadPhaseCastCollector &a_collector) const override
void GetExtents(hkVector4 &a_worldMinOut, hkVector4 &a_worldMaxOut) const override
MarkerHandling
Definition: hkp3AxisSweep.h:20
void AddObject2(hkpBroadPhaseHandle *a_object, const hkAabb &a_aabb, hkArray< hkpBroadPhaseHandlePair > &a_pairsOut) override
void AddObject1(hkpBroadPhaseHandle *a_object, const hkAabbUint32 &a_aabb, hkArray< hkpBroadPhaseHandlePair > &a_pairsOut) override
void CalcAabbCache1(const hkAabb &a_aabb, hkpBroadPhaseAabbCache *a_aabbCacheOut) const override
hkVector4 scale32bit
Definition: hkp3AxisSweep.h:108
hkVector4 offsetLow32bit
Definition: hkp3AxisSweep.h:106
hkVector4 scale
Definition: hkp3AxisSweep.h:105
void CalcContentStatistics(hkStatisticsCollector *a_collector, const hkClass *a_class) const override
hkArray< hkpBpNode > nodes
Definition: hkp3AxisSweep.h:109
hkAabb aabb
Definition: hkp3AxisSweep.h:102
void RemoveObject(hkpBroadPhaseHandle *a_object, hkArray< hkpBroadPhaseHandlePair > &a_pairsOut) override
std::uint32_t pad104
Definition: hkp3AxisSweep.h:115
BroadPhaseType GetType() const override
void CastRay(const hkpCastRayInput &a_input, hkpBroadPhaseCastCollector *a_collectorBase, std::int32_t a_collectorStriding) const override
static constexpr auto RTTI
Definition: hkp3AxisSweep.h:15
void GetAllAabbs(hkArray< hkAabb > &a_allAabbs) const override
std::int32_t GetAabbCacheSize() const override
void ReQuerySingleObject(const hkpBroadPhaseHandle *a_object, hkArray< hkpBroadPhaseHandlePair > &a_pairsOut) const override
void QuerySingleAabb(const hkAabb &a_aabb, hkArray< hkpBroadPhaseHandlePair > &a_pairsOut) const override
void QuerySingleAabbWithCollector(const hkAabb &a_aabb, hkpBroadPhaseCastCollector *a_collector) const override
std::int32_t GetNumObjects() const override
void ShiftAllObjects(const hkVector4 &a_shiftDistance, hkVector4 &a_effectiveShiftDistanceOut, hkArray< hkpBroadPhaseHandlePair > &a_newCollisionPairs) override
void GetOffsetLowHigh32bit(hkVector4 &a_offsetLow32bit, hkVector4 &a_offsetHigh32bit) const override
void GetAabb(const hkpBroadPhaseHandle *a_object, hkAabb &a_aabb) const override
std::int32_t ld2NumMarkers
Definition: hkp3AxisSweep.h:112
hkpBpAxis axis[3]
Definition: hkp3AxisSweep.h:110
bool AreAabbsOverlapping(const hkpBroadPhaseHandle *a_bhA, const hkpBroadPhaseHandle *a_bhB) const override
std::int32_t numMarkers
Definition: hkp3AxisSweep.h:111
void CheckDeterminism() override
hkpBpMarker * markers
Definition: hkp3AxisSweep.h:113
std::uint16_t BpInt
Definition: hkp3AxisSweep.h:17
void UpdateAabbs(hkpBroadPhaseHandle *a_objects[], const hkAabb *a_aabbs, std::int32_t a_numObjects, hkArray< hkpBroadPhaseHandlePair > &a_addedPairs, hkArray< hkpBroadPhaseHandlePair > &a_removedPairs) override
std::uint64_t pad108
Definition: hkp3AxisSweep.h:116
hkVector4 offsetHigh
Definition: hkp3AxisSweep.h:104
void UpdateAabbsUInt32(hkpBroadPhaseHandle *a_objects[], const hkAabbUint32 *a_aabbs, std::int32_t a_numObjects, hkArray< hkpBroadPhaseHandlePair > &a_addedPairs, hkArray< hkpBroadPhaseHandlePair > &a_removedPairs) override
void Set32BitOffsetAndScale(const hkVector4 &a_offsetLow, const hkVector4 &a_offsetHigh, const hkVector4 &a_scale) override
float intToFloatFloorCorrection
Definition: hkp3AxisSweep.h:114
void ShiftBroadPhase(const hkVector4 &a_shiftDistance, hkVector4 &a_effectiveShiftDistanceOut, hkArray< hkpBroadPhaseHandlePair > &a_newCollisionPairs) override
~hkp3AxisSweep() override
hkVector4 offsetLow
Definition: hkp3AxisSweep.h:103
void CalcAabbCache2(const hkArrayBase< hkpCollidable * > &a_overlappingCollidables, hkpBroadPhaseAabbCache *a_aabbCacheOut) const override
void AddObjectBatch(const hkArrayBase< hkpBroadPhaseHandle * > &a_addObjectList, const hkArrayBase< hkAabb > &a_addAabbList, hkArray< hkpBroadPhaseHandlePair > &a_newPairs) override
Definition: hkpBroadPhaseCastCollector.h:8
Definition: hkpBroadPhaseHandle.h:6
Definition: hkpBroadPhase.h:21
BroadPhaseType
Definition: hkpBroadPhase.h:26
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_hkp3AxisSweep
Definition: Offsets_RTTI.h:7510
char hkpBroadPhaseAabbCache
Definition: hkpBroadPhase.h:18
Definition: hkpBroadPhase.h:58
Definition: hkpBroadPhase.h:44