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