CommonLibSSE (powerof3)
Loading...
Searching...
No Matches
bhkCharacterController.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/B/BSBound.h"
4#include "RE/B/BSTEvent.h"
5#include "RE/B/BSTHashMap.h"
6#include "RE/H/hkRefPtr.h"
7#include "RE/H/hkStepInfo.h"
8#include "RE/H/hkVector4.h"
12#include "RE/M/MaterialIDs.h"
13#include "RE/N/NiPoint3.h"
14#include "RE/N/NiRefObject.h"
15#include "RE/N/NiSmartPointer.h"
16
17namespace RE
18{
19 class bhkCharacterMoveFinishEvent;
20 class bhkICharOrientationController;
21 class bhkRigidBody;
22 class bhkShape;
23 class bhkWorld;
24 class hkpRigidBody;
25 class hkpWorldObject;
26 class hkContactPoint;
27 class hkTransform;
28 class hkVector4;
29
30 struct DamageImpactData;
31
32 enum class CHARACTER_FLAGS
33 {
34 kNone = 0,
35 kQuadruped = 1 << 0,
36 kNoGravityOnGround = 1 << 1,
37 kTryStep = 1 << 2,
38 kNoFriction = 1 << 3,
39 kAllowJumpNoContact = 1 << 4,
40 kStuckQuad = 1 << 5,
41 kAnimAngleMod = 1 << 6,
42 kHitDamage = 1 << 7,
43 kHitFlags = 1 << 7,
44 kSupport = 1 << 8,
46 kCanJump = 1 << 10,
47 kChaseBip = 1 << 11,
48 kFollowRagdoll = 1 << 12,
49 kJumping = 1 << 13,
50 kNotPushable = 1 << 14,
51 kFloatLand = 1 << 15,
52 kCheckSupport = 1 << 16,
53 kNoSim = 1 << 17,
54 kFarAway = 1 << 18,
55 kOnStilts = 1 << 19,
56 kQuickSimulate = 1 << 20,
57 kRecordHits = 1 << 21,
59 kShouldersUnderWater = 1 << 23,
60 kOnStairs = 1 << 24,
61 kCanPitch = 1 << 25,
62 kCanRoll = 1 << 26,
63 kNoCharacterCollisions = 1 << 27,
64 kNotPushablePermanent = 1 << 28,
65 kPossiblePathObstacle = 1 << 29,
66 kShapeRequiresZRot = 1 << 30,
67 kSwimAtWaterSurface = 1 << 31,
68 };
69
71 public NiRefObject, // 000
72 public BSTEventSource<bhkCharacterMoveFinishEvent> // 010
73 {
74 public:
75 inline static constexpr auto RTTI = RTTI_bhkCharacterController;
76 inline static constexpr auto VTABLE = VTABLE_bhkCharacterController;
77
78 ~bhkCharacterController() override; // 00
79
80 // add
81 virtual void GetPositionImpl(hkVector4& a_pos, bool a_applyCenterOffset) const = 0; // 02
82 virtual void SetPositionImpl(const hkVector4& a_pos, bool a_applyCenterOffset, bool a_forceWarp) = 0; // 03
83 virtual void GetTransformImpl(hkTransform& a_tranform) const = 0; // 04
84 virtual void SetTransformImpl(const hkTransform& a_tranform) = 0; // 05
85 virtual void GetLinearVelocityImpl(hkVector4& a_velocity) const = 0; // 06
86 virtual void SetLinearVelocityImpl(const hkVector4& a_velocity) = 0; // 07
87 virtual void GetCollisionFilterInfo(std::uint32_t& a_collisionFilterInfo) const = 0; // 08
88 virtual void Unk_09(void) = 0; // 09
89 virtual void Unk_0A(void) = 0; // 0A
90 virtual void Unk_0B(void) = 0; // 0B
91 virtual void Unk_0C(void) = 0; // 0C
92 virtual void CheckSupportImpl() = 0; // 0D
93 virtual void Unk_0E(void) = 0; // 0E
94 virtual bhkWorld* GetWorldImpl() = 0; // 0F
95 virtual hkpWorldObject* GetBodyImpl() = 0; // 10
96 virtual float GetVDBAlpha() const = 0; // 11
97 virtual void Unk_12(void) = 0; // 12
98 virtual void RotateImpl(hkTransform& a_tranform) = 0; // 13
99
100 inline void GetPosition(hkVector4& a_pos, bool a_applyCenterOffset) const { return GetPositionImpl(a_pos, a_applyCenterOffset); }
101
102 static bool IsHurtfulBody(hkpRigidBody* a_body)
103 {
104 using func_t = decltype(&bhkCharacterController::IsHurtfulBody);
105 static REL::Relocation<func_t> func{ RELOCATION_ID(76456, 78298) };
106 return func(a_body);
107 }
108
109 void ProcessHurtfulBody(hkpRigidBody* a_body, const hkContactPoint* a_contactPoint)
110 {
111 using func_t = decltype(&bhkCharacterController::ProcessHurtfulBody);
112 static REL::Relocation<func_t> func{ RELOCATION_ID(76460, 78302) };
113 func(this, a_body, a_contactPoint);
114 }
115
116 // members
117 //std::uint64_t pad068; // 068
127 hkVector4 up; // 100
131 std::uint64_t unk180; // 180
132 std::uint64_t unk188; // 188
133 bhkICharOrientationController* orientationCtrl; // 190
134 std::uint64_t pad198; // 198
139 float velocityTime; // 220
140 float rotMod; // 224
141 float rotModTime; // 228
143 float acrobatics; // 230
144 float center; // 234
145 float waterHeight; // 238
146 float jumpHeight; // 23C
147 float fallStartHeight; // 240
148 float fallTime; // 244
149 float gravity; // 248
150 float pitchAngle; // 24C
151 float rollAngle; // 250
152 float pitchMult; // 254
153 float scale; // 258
154 float swimFloatHeight; // 25C
155 float actorHeight; // 260
156 float speedPct; // 264
157 std::uint32_t pushCount; // 268
158 std::uint32_t unk26C; // 26C
159 std::uint64_t unk270; // 270
160 std::uint64_t unk278; // 278
162 std::uint64_t unk290; // 290
163 std::uint32_t unk298; // 298
164 float lodDistance; // 29C
165 std::uint64_t unk2A0; // 2A0
166 std::uint64_t unk2A8; // 2A8
168 float bumpedForce; // 2B8
169 std::uint32_t pad2BC; // 2BC
173 std::uint32_t unk300; // 300
175 std::uint64_t unk308; // 308
176 std::uint64_t unk310; // 310
177 std::uint64_t unk318; // 318
178 std::uint64_t unk320; // 320
179 std::uint64_t unk328; // 328
180 };
181 static_assert(sizeof(bhkCharacterController) == 0x330);
182}
#define RELOCATION_ID(SE, AE)
Definition PCH.h:506
Definition Relocation.h:210
Definition EnumSet.h:9
Definition BSBound.h:9
Definition BSTEvent.h:19
Definition BSTHashMap.h:21
Definition NiSmartPointer.h:9
Definition NiRefObject.h:8
Definition bhkCharacterController.h:73
~bhkCharacterController() override
NiPointer< bhkShape > shapes[2]
Definition bhkCharacterController.h:161
std::uint64_t unk270
Definition bhkCharacterController.h:159
std::uint64_t unk188
Definition bhkCharacterController.h:132
std::uint64_t unk180
Definition bhkCharacterController.h:131
hkpSurfaceInfo surfaceInfo
Definition bhkCharacterController.h:135
virtual void Unk_12(void)=0
virtual void Unk_0E(void)=0
std::uint32_t pad2BC
Definition bhkCharacterController.h:169
hkRefPtr< hkpRigidBody > supportBody
Definition bhkCharacterController.h:167
virtual void RotateImpl(hkTransform &a_tranform)=0
std::uint64_t unk320
Definition bhkCharacterController.h:178
hkVector4 supportNorm
Definition bhkCharacterController.h:128
float bumpedForce
Definition bhkCharacterController.h:168
hkVector4 fakeSupportStart
Definition bhkCharacterController.h:126
virtual void CheckSupportImpl()=0
std::uint64_t unk308
Definition bhkCharacterController.h:175
virtual void GetPositionImpl(hkVector4 &a_pos, bool a_applyCenterOffset) const =0
hkRefPtr< hkpRigidBody > bumpedBody
Definition bhkCharacterController.h:170
float rotModTime
Definition bhkCharacterController.h:141
hkVector4 pushDelta
Definition bhkCharacterController.h:125
static constexpr auto RTTI
Definition bhkCharacterController.h:75
float waterHeight
Definition bhkCharacterController.h:145
hkVector4 direction
Definition bhkCharacterController.h:123
std::uint64_t unk278
Definition bhkCharacterController.h:160
virtual void SetTransformImpl(const hkTransform &a_tranform)=0
float swimFloatHeight
Definition bhkCharacterController.h:154
float fallStartHeight
Definition bhkCharacterController.h:147
hkVector4 forwardVec
Definition bhkCharacterController.h:118
std::uint32_t pushCount
Definition bhkCharacterController.h:157
std::uint32_t unk26C
Definition bhkCharacterController.h:158
float pitchAngle
Definition bhkCharacterController.h:150
float rotMod
Definition bhkCharacterController.h:140
virtual void Unk_0C(void)=0
std::uint32_t unk300
Definition bhkCharacterController.h:173
virtual void Unk_0B(void)=0
virtual void SetPositionImpl(const hkVector4 &a_pos, bool a_applyCenterOffset, bool a_forceWarp)=0
virtual hkpWorldObject * GetBodyImpl()=0
hkVector4 up
Definition bhkCharacterController.h:127
float actorHeight
Definition bhkCharacterController.h:155
std::uint64_t pad198
Definition bhkCharacterController.h:134
static bool IsHurtfulBody(hkpRigidBody *a_body)
Definition bhkCharacterController.h:102
static constexpr auto VTABLE
Definition bhkCharacterController.h:76
float jumpHeight
Definition bhkCharacterController.h:146
BSBound collisionBound
Definition bhkCharacterController.h:129
float scale
Definition bhkCharacterController.h:153
float fallTime
Definition bhkCharacterController.h:148
float acrobatics
Definition bhkCharacterController.h:143
hkVector4 outVelocity
Definition bhkCharacterController.h:120
BSTHashMap< NiPointer< bhkRigidBody >, DamageImpactData * > damageImpacts
Definition bhkCharacterController.h:172
float pitchMult
Definition bhkCharacterController.h:152
std::uint64_t unk328
Definition bhkCharacterController.h:179
std::uint64_t unk318
Definition bhkCharacterController.h:177
bhkICharOrientationController * orientationCtrl
Definition bhkCharacterController.h:133
std::uint64_t unk290
Definition bhkCharacterController.h:162
virtual float GetVDBAlpha() const =0
BSBound bumperCollisionBound
Definition bhkCharacterController.h:130
virtual void Unk_0A(void)=0
MATERIAL_ID surfaceMaterial
Definition bhkCharacterController.h:174
hkpCharacterStateType wantState
Definition bhkCharacterController.h:138
std::uint64_t unk2A0
Definition bhkCharacterController.h:165
float gravity
Definition bhkCharacterController.h:149
float center
Definition bhkCharacterController.h:144
std::uint64_t unk310
Definition bhkCharacterController.h:176
float lodDistance
Definition bhkCharacterController.h:164
void ProcessHurtfulBody(hkpRigidBody *a_body, const hkContactPoint *a_contactPoint)
Definition bhkCharacterController.h:109
virtual void GetLinearVelocityImpl(hkVector4 &a_velocity) const =0
hkVector4 initialVelocity
Definition bhkCharacterController.h:121
std::uint64_t unk2A8
Definition bhkCharacterController.h:166
virtual void SetLinearVelocityImpl(const hkVector4 &a_velocity)=0
float velocityTime
Definition bhkCharacterController.h:139
REX::EnumSet< CHARACTER_FLAGS, std::uint32_t > flags
Definition bhkCharacterController.h:137
virtual void Unk_09(void)=0
float rollAngle
Definition bhkCharacterController.h:151
hkVector4 velocityMod
Definition bhkCharacterController.h:122
void GetPosition(hkVector4 &a_pos, bool a_applyCenterOffset) const
Definition bhkCharacterController.h:100
hkStepInfo stepInfo
Definition bhkCharacterController.h:119
hkRefPtr< hkpRigidBody > bumpedCharCollisionObject
Definition bhkCharacterController.h:171
virtual void GetCollisionFilterInfo(std::uint32_t &a_collisionFilterInfo) const =0
virtual bhkWorld * GetWorldImpl()=0
std::uint32_t unk298
Definition bhkCharacterController.h:163
float calculatePitchTimer
Definition bhkCharacterController.h:142
hkVector4 rotCenter
Definition bhkCharacterController.h:124
float speedPct
Definition bhkCharacterController.h:156
virtual void GetTransformImpl(hkTransform &a_tranform) const =0
hkpCharacterContext context
Definition bhkCharacterController.h:136
Definition bhkWorld.h:14
Definition hkContactPoint.h:8
Definition hkRefPtr.h:7
Definition hkStepInfo.h:8
Definition hkTransform.h:9
Definition hkVector4.h:9
Definition hkpCharacterContext.h:41
Definition hkpRigidBody.h:8
Definition hkpWorldObject.h:28
Definition AbsorbEffect.h:6
constexpr std::array< REL::ID, 1 > VTABLE_bhkCharacterController
Definition Offsets_VTABLE.h:13283
CHARACTER_FLAGS
Definition bhkCharacterController.h:33
constexpr REL::ID RTTI_bhkCharacterController(static_cast< std::uint64_t >(690766))
MATERIAL_ID
Definition MaterialIDs.h:6
Definition DamageImpactData.h:11
hkpCharacterStateType
Definition hkpCharacterState.h:14
Definition hkpCharacterControl.h:8