|
| 1 | +#pragma once |
| 2 | + |
| 3 | +#include "RE/B/bhkNPCollisionObjectUnlinked.h" |
| 4 | +#include "RE/B/BSTEvent.h" |
| 5 | +#include "RE/H/hkVector4f.h" |
| 6 | +#include "RE/H/hkStepInfo.h" |
| 7 | +#include "RE/B/BSBound.h" |
| 8 | +#include "RE/N/NiPoint.h" |
| 9 | +#include "RE/H/hknpCharacterSurfaceInfo.h" |
| 10 | +#include "RE/H/hknpCharacterContext.h" |
| 11 | +#include "RE/H/hknpCharacterState.h" |
| 12 | +#include "RE/H/hkRefPtr.h" |
| 13 | +#include "RE/N/NiPointer.h" |
| 14 | +#include "RE/B/BSTHashMap.h" |
| 15 | + |
| 16 | +namespace RE |
| 17 | +{ |
| 18 | + enum class COL_LAYER; |
| 19 | + enum class SHAPE_TYPES; |
| 20 | + class bhkCharacterControllerCinfo; |
| 21 | + class bhkCharacterMoveFinishEvent; |
| 22 | + class bhkCharacterStateChangeEvent; |
| 23 | + class bhkICharOrientationController; |
| 24 | + class bhkNonSupportContactEvent; |
| 25 | + class bhkWorld; |
| 26 | + class DamageImpactData; |
| 27 | + class MoveData; |
| 28 | + |
| 29 | + class __declspec(novtable) bhkCharacterController : |
| 30 | + public bhkNPCollisionObjectUnlinked, // 000 |
| 31 | + public BSTEventSource<bhkCharacterMoveFinishEvent>, // 030 |
| 32 | + public BSTEventSource<bhkNonSupportContactEvent>, // 088 |
| 33 | + public BSTEventSource<bhkCharacterStateChangeEvent> // 0E0 |
| 34 | + { |
| 35 | + public: |
| 36 | + inline static constexpr auto RTTI{ RTTI::bhkCharacterController }; |
| 37 | + inline static constexpr auto VTABLE{ VTABLE::bhkCharacterController }; |
| 38 | + |
| 39 | + enum class CHARACTER_SIZE |
| 40 | + { |
| 41 | + kNormal = 0x0, |
| 42 | + kSized = 0x1, |
| 43 | + kSizing = 0x2 |
| 44 | + }; |
| 45 | + |
| 46 | + // add |
| 47 | + virtual float GetKeepDistanceImpl() const = 0; // 31 |
| 48 | + virtual void InitPhysicsSystemImpl(const bhkCharacterControllerCinfo& a_info) = 0; // 32 |
| 49 | + virtual void GetPositionImpl(hkVector4f& a_pos, bool a_applyCenterOffset) const = 0; // 33 |
| 50 | + virtual void SetPositionImpl(const hkVector4f& a_pos, bool a_applyCenterOffset, bool a_forceWarp) = 0; // 34 |
| 51 | + virtual void GetPredictedPositionImpl(hkVector4f& a_pos, bool a_applyCenterOffset) const = 0; // 35 |
| 52 | + virtual void ClearPreviousStepCachedDataImpl() = 0; // 36 |
| 53 | + virtual void GetTransformImpl(hkTransformf& a_transform) const = 0; // 37 |
| 54 | + virtual void SetTransformImpl(const hkTransformf& a_transform) = 0; // 38 |
| 55 | + virtual void GetLinearVelocityImpl(hkVector4f& a_linVel) const = 0; // 39 |
| 56 | + virtual void SetLinearVelocityImpl(const hkVector4f& a_linVel) = 0; // 3A |
| 57 | + virtual bool CheckPenetrationImpl() = 0; // 3B |
| 58 | + virtual bool IntegrateStepImpl(BSTArray<NiPointer<bhkNPCollisionObject>>* a_deferredReleaseColObjs) = 0; // 3C |
| 59 | + virtual void FinishMoveImpl(const MoveData& a_moveData) = 0; // 3D |
| 60 | + virtual void CheckSupportImpl() = 0; // 3E |
| 61 | + virtual void SetWorldImpl(bhkWorld* a_newWorld) = 0; // 3F |
| 62 | + virtual bhkWorld* GetWorldImpl() const = 0; // 40 |
| 63 | + virtual hknpBodyId GetBodyIdImpl() const = 0; // 41 |
| 64 | + virtual const hknpBody* GetBodyImpl() const = 0; // 42 |
| 65 | + virtual bool SetShapeImpl(hknpShape* a_shape, const hkVector4f&) = 0; // 43 |
| 66 | + virtual float GetVDBAlpha() const = 0; // 44 |
| 67 | + virtual bool GetCurrentCollisionsImpl(BSScrapArray<const hknpBody*>& a_cols) = 0; // 45 |
| 68 | + virtual bool HasPhysicsStepSubscriptionsImpl() const = 0; // 46 |
| 69 | + virtual bool AddPhysicsStepSubscriptionsImpl() = 0; // 47 |
| 70 | + virtual bool RemovePhysicsStepSubscriptionsImpl() = 0; // 48 |
| 71 | + virtual void RotateImpl(const hkTransformf& a_transf, bool a_forceWarp) = 0; // 49 |
| 72 | + virtual void SendEventOnNonSupportContactsImpl(BSTEventSink<bhkNonSupportContactEvent>& a_sink, bool a_receiveEvent) = 0; // 4A |
| 73 | + virtual void ApplyMoveImmediately() = 0; // 4B |
| 74 | + virtual void ClearCollectorDataImpl() = 0; // 4C |
| 75 | + |
| 76 | + // members |
| 77 | + hkVector4f forwardVec; // 140 |
| 78 | + hkStepInfo stepInfo; // 150 |
| 79 | + hkVector4f outVelocity; // 160 |
| 80 | + hkVector4f initialVelocity; // 170 |
| 81 | + hkVector4f velocityMod; // 180 |
| 82 | + hkVector4f direction; // 190 |
| 83 | + hkVector4f rotCenter; // 1A0 |
| 84 | + hkVector4f pushDelta; // 1B0 |
| 85 | + hkVector4f fakeSupportStart; // 1C0 |
| 86 | + hkVector4f up; // 1D0 |
| 87 | + hkVector4f supportNorm; // 1E0 |
| 88 | + BSBound collisionBound; // 1F0 |
| 89 | + BSBound bumperCollisionBound; // 220 |
| 90 | + NiPoint3 cachedLinearVelocity; // 250 |
| 91 | + NiPoint3 remainderDeltaWS; // 24C |
| 92 | + bhkICharOrientationController* orientationCtrl; // 268 |
| 93 | + hknpCharacterSurfaceInfo surfaceInfo; // 270 |
| 94 | + hknpCharacterContext context; // 2A0 |
| 95 | + std::uint32_t flags; // 300 |
| 96 | + REX::EnumSet<hknpCharacterState::hknpCharacterStateType, std::int32_t> wantState; // 304 |
| 97 | + float velocityTime; // 308 |
| 98 | + float rotMod; // 30C |
| 99 | + float rotModTime; // 310 |
| 100 | + float calculatePitchTimer; // 314 |
| 101 | + float acrobatics; // 318 |
| 102 | + float center; // 31C |
| 103 | + float waterHeight; // 320 |
| 104 | + float jumpHeight; // 324 |
| 105 | + float fallStartHeight; // 328 |
| 106 | + float fallTime; // 32C |
| 107 | + float gravity; // 330 |
| 108 | + float pitchAngle; // 334 |
| 109 | + float rollAngle; // 338 |
| 110 | + float pitchMult; // 33C |
| 111 | + float scale; // 340 |
| 112 | + float swimFloatHeight; // 344 |
| 113 | + float actorHeight; // 348 |
| 114 | + float speedPct; // 34C |
| 115 | + std::uint32_t pushCount; // 350 |
| 116 | + REX::EnumSet<SHAPE_TYPES, std::int32_t> shapeType; // 354 |
| 117 | + REX::EnumSet<SHAPE_TYPES, std::int32_t> sizedShapeType; // 358 |
| 118 | + hkRefPtr<hknpShape> shapes[2]; // 360 |
| 119 | + float radius; // 370 |
| 120 | + float height; // 374 |
| 121 | + float destRadius; // 378 |
| 122 | + float lodDistance; // 37C |
| 123 | + REX::EnumSet<CHARACTER_SIZE, std::int32_t> size; // 380 |
| 124 | + std::uint32_t priority; // 384 |
| 125 | + std::int32_t supportCount; // 388 |
| 126 | + NiPointer<bhkNPCollisionObject> supportBody; // 390 |
| 127 | + float bumpedForce; // 398 |
| 128 | + NiPointer<bhkNPCollisionObject> bumpedBody; // 3A0 |
| 129 | + NiPointer<bhkNPCollisionObject> bumpedCharCollisionObject; // 3A8 |
| 130 | + BSTHashMap<std::uint32_t, float> bumpedBodyIdExpirationM; // 3B0 |
| 131 | + void* userData; // 3E0 |
| 132 | + BSTHashMap<bhkNPCollisionObject*, DamageImpactData*> damageImpacts; // 3E8 |
| 133 | + float maxSlope; // 418 |
| 134 | + std::uint32_t supportMaterial; // 41C |
| 135 | + REX::EnumSet<COL_LAYER, std::int32_t> supportLayer; // 420 |
| 136 | + float stepHeight; // 424 |
| 137 | + float stepHeightMod; // 428 |
| 138 | + float stepHeightModTimer; // 42C |
| 139 | + const float castDepthC; // 430 |
| 140 | + std::uint32_t numCollisions; // 434 |
| 141 | + std::uint32_t stickyCollisionGroup; // 438 |
| 142 | + bool allSurfacesStopped; // 43C |
| 143 | + bool stickyCollisions; // 43D |
| 144 | + bool fakeSupport; // 43E |
| 145 | + bool calculatePitch; // 43F |
| 146 | + bool useBumper; // 440 |
| 147 | + bool hasBumper; // 441 |
| 148 | + bool inAirPreMove; // 442 |
| 149 | + }; |
| 150 | + static_assert(sizeof(bhkCharacterController) == 0x450); |
| 151 | +} |
0 commit comments