CommonLibVR
Loading...
Searching...
No Matches
BShkbAnimationGraph.h
Go to the documentation of this file.
1#pragma once
2
6#include "RE/B/BSTArray.h"
7#include "RE/B/BSTEvent.h"
9#include "RE/H/hkbCharacter.h"
10
11namespace RE
12{
13 class bhkWorld;
14 class BSFadeNode;
15 class BShkFloatController;
16 class BSTransformDeltaEvent;
17 class hkbBehaviorGraph;
18 struct BSAnimationGraphEvent;
19 struct hkbGeneratorOutput;
20
21 namespace BSResource
22 {
23 struct ID;
24 }
25
27
29 public BSIRagdollDriver, // 000
30 public BSIntrusiveRefCounted, // 008
31 public BSTEventSource<BSTransformDeltaEvent>, // 010
32 public BSTEventSource<BSAnimationGraphEvent> // 068
33 {
34 public:
35 inline static constexpr auto RTTI = RTTI_BShkbAnimationGraph;
36 inline static constexpr auto VTABLE = VTABLE_BShkbAnimationGraph;
37
39 {
40 NiNode* node; // 00
41 uint32_t unk08;
42 uint32_t unk0C;
43 };
44
45 ~BShkbAnimationGraph() override; // 00
46
47 // override (BSIRagdollDriver)
48 bool HasRagdoll() override; // 01
49 bool AddRagdollToWorld() override; // 02
50 bool RemoveRagdollFromWorld() override; // 03
51 void SetWorld(bhkWorld* a_world) override; // 04 - { world = a_world; }
52 void ResetRagdoll(void) override; // 05
53 void Unk_06(void) override; // 06
55 void SetMotionType(hkpMotion::MotionType a_motionType) override; // 08
56 void Unk_09(void) override; // 09
57 void ToggleSyncOnUpdate(bool a_disable) override; // 0A
58 void Unk_0B(void) override; // 0B
59 void ToggleConstraints(bool a_disable) override; // 0C
60 void Unk_0D(void) override; // 0D
61
62 template <class T>
63 [[nodiscard]] inline BSTEventSource<T>* GetEventSource()
64 {
65 return static_cast<BSTEventSource<T>*>(this);
66 }
67
68 template <class T>
69 inline void AddEventSink(BSTEventSink<T>* a_eventSink)
70 {
71 GetEventSource<T>()->AddEventSink(a_eventSink);
72 }
73
74 template <class T>
75 inline void RemoveEventSink(BSTEventSink<T>* a_eventSink)
76 {
77 GetEventSource<T>()->RemoveEventSink(a_eventSink);
78 }
79
80 bool GetGraphVariableBool(const BSFixedString& a_variableName, bool& a_out) const
81 {
82 using func_t = decltype(&BShkbAnimationGraph::GetGraphVariableBool);
83 static REL::Relocation<func_t> func{ RELOCATION_ID(62696, 63613) };
84 return func(this, a_variableName, a_out);
85 }
86
87 bool GetGraphVariableFloat(const BSFixedString& a_variableName, float& a_out) const
88 {
89 using func_t = decltype(&BShkbAnimationGraph::GetGraphVariableFloat);
90 static REL::Relocation<func_t> func{ RELOCATION_ID(62695, 63614) };
91 return func(this, a_variableName, a_out);
92 }
93
94 bool GetGraphVariableInt(const BSFixedString& a_variableName, int& a_out) const
95 {
96 using func_t = decltype(&BShkbAnimationGraph::GetGraphVariableInt);
97 static REL::Relocation<func_t> func{ RELOCATION_ID(62694, 63615) };
98 return func(this, a_variableName, a_out);
99 }
100
101 bool SetGraphVariableBool(const BSFixedString& a_variableName, const bool a_in)
102 {
103 using func_t = decltype(&BShkbAnimationGraph::SetGraphVariableBool);
104 static REL::Relocation<func_t> func{ RELOCATION_ID(63609, 62708) };
105 return func(this, a_variableName, a_in);
106 }
107
108 bool SetGraphVariableFloat(const BSFixedString& a_variableName, const float a_in)
109 {
110 using func_t = decltype(&BShkbAnimationGraph::SetGraphVariableFloat);
111 static REL::Relocation<func_t> func{ RELOCATION_ID(63608, 62709) };
112 return func(this, a_variableName, a_in);
113 }
114
115 bool SetGraphVariableInt(const BSFixedString& a_variableName, const int a_in)
116 {
117 using func_t = decltype(&BShkbAnimationGraph::SetGraphVariableInt);
118 static REL::Relocation<func_t> func{ RELOCATION_ID(63607, 62710) };
119 return func(this, a_variableName, a_in);
120 }
121
122 // members
129 std::uint64_t unk1D8; // 1D8
130 std::uint64_t unk1E0; // 1E0
134 void* projectDBData; // 200 - BShkbHkxDB::ProjectDBData*
136 Actor* holder; // 210
138 hkbGeneratorOutput* generatorOutputs[2]; // 220
139 float interpolationAmounts[2]; // 230
141 std::uint16_t numAnimBones; // 240
142 std::uint8_t unk242; // 242
143 std::uint8_t unk243; // 243
144 std::uint16_t unk244; // 244
145 std::uint8_t unk246; // 246
146 std::uint8_t unk247; // 247
147 std::uint8_t unk248; // 248
148 std::uint8_t doFootIK; // 249
149 std::uint16_t unk24A; // 24A
150 std::uint32_t unk24C; // 24C
151 private:
153 };
154 static_assert(sizeof(BShkbAnimationGraph) == 0x250);
155}
#define BSSmartPointer(className)
Definition BSTSmartPointer.h:284
#define KEEP_FOR_RE()
Definition PCH.h:517
#define RELOCATION_ID(SE, AE)
Definition PCH.h:506
Definition Relocation.h:210
Definition Actor.h:133
Definition BSFadeNode.h:11
Definition BSIRagdollDriver.h:10
Definition BSTArray.h:378
Definition BSTEvent.h:143
Definition BSTEvent.h:19
Definition BShkbAnimationGraph.h:33
void ToggleSyncOnUpdate(bool a_disable) override
BSFadeNode * rootNode
Definition BShkbAnimationGraph.h:137
BSTSmallArray< std::uint8_t > unk1C0
Definition BShkbAnimationGraph.h:128
std::uint8_t doFootIK
Definition BShkbAnimationGraph.h:148
std::uint64_t unk1D8
Definition BShkbAnimationGraph.h:129
void SetRagdollConstraintsFromBhkConstraints() override
hkbBehaviorGraph * behaviorGraph
Definition BShkbAnimationGraph.h:135
void Unk_0B(void) override
std::uint16_t unk244
Definition BShkbAnimationGraph.h:144
bool GetGraphVariableBool(const BSFixedString &a_variableName, bool &a_out) const
Definition BShkbAnimationGraph.h:80
BSTArray< BoneNodeEntry > boneNodes
Definition BShkbAnimationGraph.h:124
float interpolationAmounts[2]
Definition BShkbAnimationGraph.h:139
void ResetRagdoll(void) override
std::uint8_t unk246
Definition BShkbAnimationGraph.h:145
float interpolationTimeOffsets[2]
Definition BShkbAnimationGraph.h:131
bool RemoveRagdollFromWorld() override
std::uint16_t unk24A
Definition BShkbAnimationGraph.h:149
bool SetGraphVariableInt(const BSFixedString &a_variableName, const int a_in)
Definition BShkbAnimationGraph.h:115
bool GetGraphVariableFloat(const BSFixedString &a_variableName, float &a_out) const
Definition BShkbAnimationGraph.h:87
void * projectDBData
Definition BShkbAnimationGraph.h:134
bhkWorld * physicsWorld
Definition BShkbAnimationGraph.h:140
std::uint32_t unk24C
Definition BShkbAnimationGraph.h:150
~BShkbAnimationGraph() override
std::uint16_t numAnimBones
Definition BShkbAnimationGraph.h:141
BSTArray< BShkFloatController * > fadeControllers
Definition BShkbAnimationGraph.h:125
std::uint8_t unk243
Definition BShkbAnimationGraph.h:143
std::uint64_t unk1E0
Definition BShkbAnimationGraph.h:130
void ToggleConstraints(bool a_disable) override
std::uint8_t unk247
Definition BShkbAnimationGraph.h:146
BSTArray< void * > unk190
Definition BShkbAnimationGraph.h:126
BSTSmallArray< void * > unk1A8
Definition BShkbAnimationGraph.h:127
bool GetGraphVariableInt(const BSFixedString &a_variableName, int &a_out) const
Definition BShkbAnimationGraph.h:94
void SetWorld(bhkWorld *a_world) override
BSFixedString projectName
Definition BShkbAnimationGraph.h:132
bool SetGraphVariableBool(const BSFixedString &a_variableName, const bool a_in)
Definition BShkbAnimationGraph.h:101
void Unk_09(void) override
BSTEventSource< T > * GetEventSource()
Definition BShkbAnimationGraph.h:63
void Unk_0D(void) override
void RemoveEventSink(BSTEventSink< T > *a_eventSink)
Definition BShkbAnimationGraph.h:75
hkbGeneratorOutput * generatorOutputs[2]
Definition BShkbAnimationGraph.h:138
static constexpr auto RTTI
Definition BShkbAnimationGraph.h:35
Actor * holder
Definition BShkbAnimationGraph.h:136
static constexpr auto VTABLE
Definition BShkbAnimationGraph.h:36
void AddEventSink(BSTEventSink< T > *a_eventSink)
Definition BShkbAnimationGraph.h:69
bool SetGraphVariableFloat(const BSFixedString &a_variableName, const float a_in)
Definition BShkbAnimationGraph.h:108
std::uint8_t unk248
Definition BShkbAnimationGraph.h:147
std::uint8_t unk242
Definition BShkbAnimationGraph.h:142
bool HasRagdoll() override
void SetMotionType(hkpMotion::MotionType a_motionType) override
void Unk_06(void) override
BSResource::ID * unk1F8
Definition BShkbAnimationGraph.h:133
bool AddRagdollToWorld() override
hkbCharacter characterInstance
Definition BShkbAnimationGraph.h:123
Definition NiNode.h:12
Definition bhkWorld.h:14
Definition hkbBehaviorGraph.h:12
Definition hkbCharacter.h:16
MotionType
Definition hkpMotion.h:27
Definition AbsorbEffect.h:6
constexpr REL::ID RTTI_BShkbAnimationGraph(static_cast< std::uint64_t >(690023))
constexpr std::array< REL::ID, 1 > VTABLE_BShkbAnimationGraph
Definition Offsets_VTABLE.h:10589
Definition BSIntrusiveRefCounted.h:8
Definition ID.h:10
Definition BShkbAnimationGraph.h:39
NiNode * node
Definition BShkbAnimationGraph.h:40
uint32_t unk08
Definition BShkbAnimationGraph.h:41
uint32_t unk0C
Definition BShkbAnimationGraph.h:42