CommonLibSSE (powerof3)
ThirdPersonState.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSFixedString.h"
4 #include "RE/N/NiPoint2.h"
5 #include "RE/N/NiPoint3.h"
6 #include "RE/N/NiQuaternion.h"
8 #include "RE/T/TESCameraState.h"
9 
10 namespace RE
11 {
12  class NiNode;
13 
15  public TESCameraState, // 00
16  public PlayerInputHandler // 20
17  {
18  public:
19  inline static constexpr auto RTTI = RTTI_ThirdPersonState;
20  inline static constexpr auto VTABLE = VTABLE_ThirdPersonState;
21 
22  ~ThirdPersonState() override; // 00
23 
24  // override (TESCameraState)
25  void Begin() override; // 01
26  void End() override; // 02
27  void Update(BSTSmartPointer<TESCameraState>& a_nextState) override; // 03
28  void GetRotation(NiQuaternion& a_rotation) override; // 04
29  void GetTranslation(NiPoint3& a_translation) override; // 05
30  void SaveGame(BGSSaveFormBuffer* a_buf) override; // 06
31  void LoadGame(BGSLoadFormBuffer* a_buf) override; // 07
32  void Revert(BGSLoadFormBuffer* a_buf) override; // 08
33 
34  // override (PlayerInputHandler)
35  bool CanProcess(InputEvent* a_event) override; // 01
36  void ProcessButton(ButtonEvent* a_event, PlayerControlsData* a_movementData) override; // 04
37 
38  // add
39  virtual void SetCameraHandle(RefHandle& a_handle); // 09 - { return; }
40  virtual void Unk_0A(void); // 0A - { return; }
41  virtual void ProcessWeaponDrawnChange(bool a_drawn); // 0B
42  virtual bool GetFreeRotationMode() const; // 0C
43  virtual void SetFreeRotationMode(bool a_weaponSheathed); // 0D
44  virtual void UpdateRotation(); // 0E
45  virtual void HandleLookInput(const NiPoint2& a_input); // 0F
46 
47  // members
51  NiQuaternion rotation; // 4C - [-1, 1]
54  float targetZoomOffset; // 74
55  float currentZoomOffset; // 78
56  float targetYaw; // 7C - in radians
57  float currentYaw; // 80 - in radians
58  float savedZoomOffset; // 84
59  float pitchZoomOffset; // 88 - [0, 100]
60  float unk8C; // 8C
61  NiPoint3 collisionPos; // 90 - valid if collisionPosValid != NaN
62  float collisionPosValid; // 9C
63  std::uint64_t unkA0; // A0
66  std::uint64_t unkC0; // C0
67  std::uint64_t unkC8; // C8
68  std::uint32_t unkD0; // D0
70  bool freeRotationEnabled; // DC
71  bool stateNotActive; // DD
72  std::uint16_t unkDC; // DE
73  bool toggleAnimCam; // E0
74  bool applyOffsets; // E1
75  std::uint16_t unkE2; // E2
76  std::uint32_t unkE4; // E4
77  };
78  static_assert(sizeof(ThirdPersonState) == 0xE8);
79 }
Definition: BGSLoadFormBuffer.h:11
Definition: BGSSaveFormBuffer.h:8
Definition: BSTSmartPointer.h:37
Definition: ButtonEvent.h:11
Definition: InputEvent.h:25
Definition: NiAVObject.h:51
Definition: NiNode.h:12
Definition: NiPoint2.h:6
Definition: NiPoint3.h:6
Definition: NiQuaternion.h:6
Definition: PlayerControlsData.h:8
Definition: PlayerInputHandler.h:12
Definition: TESCameraState.h:16
Definition: ThirdPersonState.h:17
virtual void UpdateRotation()
float targetYaw
Definition: ThirdPersonState.h:56
void ProcessButton(ButtonEvent *a_event, PlayerControlsData *a_movementData) override
virtual void HandleLookInput(const NiPoint2 &a_input)
void Begin() override
NiQuaternion animationRotation
Definition: ThirdPersonState.h:65
virtual bool GetFreeRotationMode() const
std::uint64_t unkC8
Definition: ThirdPersonState.h:67
std::uint16_t unkE2
Definition: ThirdPersonState.h:75
float collisionPosValid
Definition: ThirdPersonState.h:62
void SaveGame(BGSSaveFormBuffer *a_buf) override
static constexpr auto RTTI
Definition: ThirdPersonState.h:19
~ThirdPersonState() override
std::uint32_t unkD0
Definition: ThirdPersonState.h:68
void GetTranslation(NiPoint3 &a_translation) override
void LoadGame(BGSLoadFormBuffer *a_buf) override
float unk8C
Definition: ThirdPersonState.h:60
bool stateNotActive
Definition: ThirdPersonState.h:71
virtual void ProcessWeaponDrawnChange(bool a_drawn)
float currentYaw
Definition: ThirdPersonState.h:57
virtual void SetCameraHandle(RefHandle &a_handle)
BSFixedString animatedBoneName
Definition: ThirdPersonState.h:64
bool toggleAnimCam
Definition: ThirdPersonState.h:73
float targetZoomOffset
Definition: ThirdPersonState.h:54
NiPoint3 translation
Definition: ThirdPersonState.h:50
NiPoint3 posOffsetActual
Definition: ThirdPersonState.h:53
void End() override
std::uint16_t unkDC
Definition: ThirdPersonState.h:72
void Revert(BGSLoadFormBuffer *a_buf) override
virtual void SetFreeRotationMode(bool a_weaponSheathed)
virtual void Unk_0A(void)
float pitchZoomOffset
Definition: ThirdPersonState.h:59
NiQuaternion rotation
Definition: ThirdPersonState.h:51
bool CanProcess(InputEvent *a_event) override
float savedZoomOffset
Definition: ThirdPersonState.h:58
NiPoint3 collisionPos
Definition: ThirdPersonState.h:61
std::uint64_t unkA0
Definition: ThirdPersonState.h:63
std::uint64_t unkC0
Definition: ThirdPersonState.h:66
bool applyOffsets
Definition: ThirdPersonState.h:74
float currentZoomOffset
Definition: ThirdPersonState.h:55
bool freeRotationEnabled
Definition: ThirdPersonState.h:70
NiPoint3 posOffsetExpected
Definition: ThirdPersonState.h:52
NiNode * thirdPersonFOVControl
Definition: ThirdPersonState.h:49
NiPoint2 freeRotation
Definition: ThirdPersonState.h:69
void GetRotation(NiQuaternion &a_rotation) override
std::uint32_t unkE4
Definition: ThirdPersonState.h:76
NiAVObject * thirdPersonCameraObj
Definition: ThirdPersonState.h:48
static constexpr auto VTABLE
Definition: ThirdPersonState.h:20
void Update(BSTSmartPointer< TESCameraState > &a_nextState) override
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_ThirdPersonState(static_cast< std::uint64_t >(686391))
constexpr std::array< REL::ID, 2 > VTABLE_ThirdPersonState
Definition: Offsets_VTABLE.h:12931
std::uint32_t RefHandle
Definition: BSCoreTypes.h:6