CommonLibSSE (Parapets fork)
PlayerCamera.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSAtomic.h"
4 #include "RE/B/BSPointerHandle.h"
5 #include "RE/B/BSTArray.h"
6 #include "RE/B/BSTSingleton.h"
7 #include "RE/B/BSTSmartPointer.h"
8 #include "RE/N/NiPoint3.h"
9 #include "RE/T/TESCamera.h"
10 
11 namespace RE
12 {
13  class bhkRigidBody;
14  class bhkSimpleShapePhantom;
15  class NiRefObject;
16  class TESCameraState;
17 
18  struct CameraStates
19  {
20  enum CameraState : std::uint32_t
21  {
35 
36  kTotal
37  };
38  };
40 
41  class PlayerCamera :
42  public TESCamera, // 000
43  public BSTSingletonSDM<PlayerCamera> // 038
44  {
45  public:
46  inline static constexpr auto RTTI = RTTI_PlayerCamera;
47 
48  struct Unk120
49  {
52  };
53  static_assert(sizeof(Unk120) == 0x10);
54 
55  ~PlayerCamera() override; // 00
56 
57  // override (TESCamera)
58  void SetCameraRoot(NiPointer<NiNode> a_root) override; // 01
59 
61 
62  void UpdateThirdPerson(bool a_weaponDrawn);
63 
64  // members
65  std::uint8_t pad039; // 039
66  std::uint16_t pad03A; // 03A
70  Unk120* unk120; // 120 - ?
73  mutable BSSpinLock lock; // 134
74  float worldFOV; // 13C
75  float firstPersonFOV; // 140
76  NiPoint3 pos; // 144 - ?
77  float idleTimer; // 150 - ?
78  float yaw; // 154 - ? - in radians
79  std::uint32_t unk158; // 158 - ?
80  std::uint32_t unk15C; // 15C - ?
81  bool allowAutoVanityMode; // 160
82  bool bowZoomedIn; // 161
83  bool isWeapSheathed; // 162 - ?
84  bool isProcessed; // 163 - ?
85  std::uint8_t unk164; // 164
86  std::uint8_t unk165; // 165
87  std::uint16_t pad166; // 166
88  };
89  static_assert(sizeof(PlayerCamera) == 0x168);
90 }
Definition: BSAtomic.h:49
Definition: BSTArray.h:377
Definition: BSTSmartPointer.h:37
Definition: NiPoint3.h:6
Definition: PlayerCamera.h:44
BSTSmartPointer< TESCameraState > cameraStates[CameraStates::kTotal]
Definition: PlayerCamera.h:69
RefHandle objectFadeHandle
Definition: PlayerCamera.h:72
float idleTimer
Definition: PlayerCamera.h:77
bool isWeapSheathed
Definition: PlayerCamera.h:83
BSSpinLock lock
Definition: PlayerCamera.h:73
~PlayerCamera() override
bool allowAutoVanityMode
Definition: PlayerCamera.h:81
float firstPersonFOV
Definition: PlayerCamera.h:75
NiPoint3 pos
Definition: PlayerCamera.h:76
void UpdateThirdPerson(bool a_weaponDrawn)
ActorHandle cameraTarget
Definition: PlayerCamera.h:67
BSTSmallArray< TESCameraState *, CameraStates::kTotal > tempReturnStates
Definition: PlayerCamera.h:68
std::uint8_t unk164
Definition: PlayerCamera.h:85
bool bowZoomedIn
Definition: PlayerCamera.h:82
std::uint32_t unk15C
Definition: PlayerCamera.h:80
float worldFOV
Definition: PlayerCamera.h:74
std::uint16_t pad166
Definition: PlayerCamera.h:87
std::uint16_t pad03A
Definition: PlayerCamera.h:66
NiPointer< bhkRigidBody > rigidBody
Definition: PlayerCamera.h:71
bool isProcessed
Definition: PlayerCamera.h:84
float yaw
Definition: PlayerCamera.h:78
std::uint32_t unk158
Definition: PlayerCamera.h:79
static PlayerCamera * GetSingleton()
void SetCameraRoot(NiPointer< NiNode > a_root) override
std::uint8_t pad039
Definition: PlayerCamera.h:65
static constexpr auto RTTI
Definition: PlayerCamera.h:46
Unk120 * unk120
Definition: PlayerCamera.h:70
std::uint8_t unk165
Definition: PlayerCamera.h:86
Definition: TESCamera.h:13
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_PlayerCamera
Definition: Offsets_RTTI.h:5715
std::uint32_t RefHandle
Definition: BSCoreTypes.h:6
Definition: BSTSingleton.h:50
Definition: PlayerCamera.h:19
CameraState
Definition: PlayerCamera.h:21
@ kBleedout
Definition: PlayerCamera.h:33
@ kFurniture
Definition: PlayerCamera.h:27
@ kTween
Definition: PlayerCamera.h:29
@ kTotal
Definition: PlayerCamera.h:36
@ kFirstPerson
Definition: PlayerCamera.h:22
@ kVATS
Definition: PlayerCamera.h:24
@ kDragon
Definition: PlayerCamera.h:34
@ kAutoVanity
Definition: PlayerCamera.h:23
@ kThirdPerson
Definition: PlayerCamera.h:31
@ kIronSights
Definition: PlayerCamera.h:26
@ kPCTransition
Definition: PlayerCamera.h:28
@ kFree
Definition: PlayerCamera.h:25
@ kMount
Definition: PlayerCamera.h:32
@ kAnimated
Definition: PlayerCamera.h:30
Definition: PlayerCamera.h:49
NiPointer< bhkSimpleShapePhantom * > unk00
Definition: PlayerCamera.h:50
NiPointer< bhkSimpleShapePhantom * > unk08
Definition: PlayerCamera.h:51