CommonLibSSE NG
Loading...
Searching...
No Matches
NiTimeController.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/N/NiObject.h"
5
6namespace RE
7{
8 class NiObjectNET;
9
11
13 {
14 public:
15 inline static constexpr auto RTTI = RTTI_NiTimeController;
16 inline static auto Ni_RTTI = NiRTTI_NiTimeController;
17
18 enum class CycleType
19 {
20 kLoop,
22 kClamp,
23
24 kTotal
25 };
26
27 enum class Flag
28 {
29 kAnimType_AppTime = 0 << 0,
30 kAnimType_AppInit = 1 << 0,
32
33 kCycleType_Loop = 0 << 1,
34 kCycleType_Reverse = 1 << 1,
35 kCycleType_Clamp = 2 << 1,
37
38 kActive = 1 << 3,
39 kPlayBackwards = 1 << 4,
40 kManagerControlled = 1 << 5,
41 kComputeScaledTime = 1 << 6,
42 kForceUpdate = 1 << 7
43 };
44
45 inline NiTimeController() { ctor(); }
46 ~NiTimeController() override { dtor(); } // 00
47
48 // override (NiObject)
49 const NiRTTI* GetRTTI() const override; // 02
50 void LoadBinary(NiStream& a_stream) override; // 18
51 void LinkObject(NiStream& a_stream) override; // 19
52 bool RegisterStreamables(NiStream& a_stream) override; // 1A
53 void SaveBinary(NiStream& a_stream) override; // 1B
54 bool IsEqual(NiObject* a_object) override; // 1C
55 void ProcessClone(NiCloningProcess& a_cloning) override; // 1D
56
57 // add
58 virtual void Start(float a_time); // 25
59 virtual void Stop(); // 26
60 virtual void Update(float a_time) = 0; // 27
61 virtual void SetTarget(NiObjectNET* a_target); // 28
62 [[nodiscard]] virtual bool IsTransformController() const { return false; } // 29
63 [[nodiscard]] virtual bool IsVertexController() const { return false; } // 2A
64 virtual float ComputeScaledTime(float a_time); // 2B
65 virtual void OnPreDisplay() { return; } // 2C
66 [[nodiscard]] virtual bool IsStreamable() const { return true; } // 2D
67 [[nodiscard]] virtual bool TargetIsRequiredType() const = 0; // 2E
68
69 static void StartAnimations(NiObjectNET* a_target);
70
71 [[nodiscard]] constexpr NiTimeController* GetNext() const noexcept { return next.get(); }
72
73 // members
75 std::uint16_t pad12; // 12
76 float frequency; // 14
77 float phase; // 18
78 float loKeyTime; // 1C
79 float hiKeyTime; // 20
80 float startTime; // 24
81 float lastTime; // 28
82 float weightedLastTime; // 2C
83 float scaledTime; // 30
84 std::uint32_t pad34; // 34
86 NiPointer<NiTimeController> next; // 40 - singly-linked list
87
88 private:
89 NiTimeController* ctor();
90 void dtor();
91 };
92 static_assert(sizeof(NiTimeController) == 0x48);
93}
#define NiSmartPointer(className)
Definition NiSmartPointer.h:251
Definition NiCloningProcess.h:10
Definition NiObject.h:37
Definition NiObjectNET.h:13
Definition NiSmartPointer.h:9
Definition NiRTTI.h:6
Definition NiStream.h:27
Definition NiTimeController.h:13
float hiKeyTime
Definition NiTimeController.h:79
virtual bool TargetIsRequiredType() const =0
void SaveBinary(NiStream &a_stream) override
float weightedLastTime
Definition NiTimeController.h:82
virtual void Stop()
virtual void SetTarget(NiObjectNET *a_target)
std::uint16_t pad12
Definition NiTimeController.h:75
virtual float ComputeScaledTime(float a_time)
Flag
Definition NiTimeController.h:28
static void StartAnimations(NiObjectNET *a_target)
virtual void OnPreDisplay()
Definition NiTimeController.h:65
float phase
Definition NiTimeController.h:77
float startTime
Definition NiTimeController.h:80
const NiRTTI * GetRTTI() const override
virtual void Start(float a_time)
virtual bool IsTransformController() const
Definition NiTimeController.h:62
float frequency
Definition NiTimeController.h:76
float lastTime
Definition NiTimeController.h:81
static constexpr auto RTTI
Definition NiTimeController.h:15
void LinkObject(NiStream &a_stream) override
static auto Ni_RTTI
Definition NiTimeController.h:16
CycleType
Definition NiTimeController.h:19
std::uint32_t pad34
Definition NiTimeController.h:84
void LoadBinary(NiStream &a_stream) override
NiTimeController()
Definition NiTimeController.h:45
constexpr NiTimeController * GetNext() const noexcept
Definition NiTimeController.h:71
virtual bool IsStreamable() const
Definition NiTimeController.h:66
stl::enumeration< Flag, std::uint16_t > flags
Definition NiTimeController.h:74
float scaledTime
Definition NiTimeController.h:83
float loKeyTime
Definition NiTimeController.h:78
bool IsEqual(NiObject *a_object) override
void ProcessClone(NiCloningProcess &a_cloning) override
~NiTimeController() override
Definition NiTimeController.h:46
NiObjectNET * target
Definition NiTimeController.h:85
bool RegisterStreamables(NiStream &a_stream) override
virtual void Update(float a_time)=0
NiPointer< NiTimeController > next
Definition NiTimeController.h:86
virtual bool IsVertexController() const
Definition NiTimeController.h:63
Definition PCH.h:223
Definition AbsorbEffect.h:6
constexpr REL::VariantID RTTI_NiTimeController(685207, 392972, 0x1ee1790)
constexpr REL::VariantID NiRTTI_NiTimeController(523943, 410523, 0x316be80)