CommonLibVR
NiParticleSystem.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/N/NiParticles.h"
4 #include "RE/N/NiTPointerList.h"
5 
6 namespace RE
7 {
8  class NiPSysModifier;
9 
11  {
12  public:
13  inline static constexpr auto RTTI = RTTI_NiParticleSystem;
14  inline static constexpr auto Ni_RTTI = NiRTTI_NiParticleSystem;
15  inline static constexpr auto VTABLE = VTABLE_NiParticleSystem;
16 
17  ~NiParticleSystem() override; // 00
18 
19  // override (NiParticles)
20  const NiRTTI* GetRTTI() const override; // 02
21  NiObject* CreateClone(NiCloningProcess& a_cloning) override; // 17
22  void LoadBinary(NiStream& a_stream) override; // 18
23  void LinkObject(NiStream& a_stream) override; // 19 - { BSGeometry::LinkObject(a_stream); }
24  bool RegisterStreamables(NiStream& a_stream) override; // 1A - { return BSGeometry::RegisterStreamables(a_stream); }
25  void SaveBinary(NiStream& a_stream) override; // 1B
26  bool IsEqual(NiObject* a_object) override; // 1C - { return BSGeometry::IsEqual(); }
27  void ProcessClone(NiCloningProcess& a_cloning) override; // 1D
28  void SetSelectiveUpdateFlags(bool& a_selectiveUpdate, bool a_selectiveUpdateTransforms, bool& a_rigid) override; // 2B
29  void UpdateDownwardPass(NiUpdateData& a_data, std::uint32_t a_arg2) override; // 2C
30  void UpdateSelectedDownwardPass(NiUpdateData& a_data, std::uint32_t a_arg2) override; // 2D
31  void UpdateRigidDownwardPass(NiUpdateData& a_data, std::uint32_t a_arg2) override; // 2E
32  void UpdateWorldData(NiUpdateData* a_data) override; // 30
33 
34  // add
35  virtual void UpdateSystem(float a_time); // 38 - { return NiParticleSystem::Do_UpdateSystem(a_time); }
36  virtual void Do_UpdateSystem(float a_time); // 39
37 
38  void AddModifier(NiPSysModifier* a_modifier)
39  {
40  using func_t = decltype(&NiParticleSystem::AddModifier);
41  static REL::Relocation<func_t> func{ RELOCATION_ID(72799, 74499) };
42  return func(this, a_modifier);
43  }
44 
45  // members
47  float unk180; // 180
48  float unk184; // 184
49  float unk188; // 188
50  float lastUpdate; // 18C
51  bool resetSystem; // 190
52  bool dynamicBounds; // 191
53  bool isWorldspace; // 192
54  std::uint8_t pad193; // 192
55  std::uint32_t pad194; // 194
56  private:
57  KEEP_FOR_RE()
58  };
59 #ifndef SKYRIMVR
60  static_assert(sizeof(NiParticleSystem) == 0x198);
61 #else
62  static_assert(sizeof(NiParticleSystem) == 0x1D8);
63 #endif
64 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
#define RELOCATION_ID(SE, AE)
Definition: PCH.h:702
Definition: Relocation.h:210
Definition: NiCloningProcess.h:10
Definition: NiObject.h:37
Definition: NiPSysModifier.h:14
Definition: NiParticleSystem.h:11
void UpdateDownwardPass(NiUpdateData &a_data, std::uint32_t a_arg2) override
void UpdateWorldData(NiUpdateData *a_data) override
static constexpr auto Ni_RTTI
Definition: NiParticleSystem.h:14
bool isWorldspace
Definition: NiParticleSystem.h:53
std::uint8_t pad193
Definition: NiParticleSystem.h:54
static constexpr auto VTABLE
Definition: NiParticleSystem.h:15
const NiRTTI * GetRTTI() const override
std::uint32_t pad194
Definition: NiParticleSystem.h:55
float unk188
Definition: NiParticleSystem.h:49
bool RegisterStreamables(NiStream &a_stream) override
static constexpr auto RTTI
Definition: NiParticleSystem.h:13
float unk180
Definition: NiParticleSystem.h:47
bool IsEqual(NiObject *a_object) override
void SaveBinary(NiStream &a_stream) override
NiTPointerList< NiPointer< NiPSysModifier > > modifierList
Definition: NiParticleSystem.h:46
bool resetSystem
Definition: NiParticleSystem.h:51
bool dynamicBounds
Definition: NiParticleSystem.h:52
virtual void Do_UpdateSystem(float a_time)
virtual void UpdateSystem(float a_time)
NiObject * CreateClone(NiCloningProcess &a_cloning) override
void UpdateRigidDownwardPass(NiUpdateData &a_data, std::uint32_t a_arg2) override
~NiParticleSystem() override
float unk184
Definition: NiParticleSystem.h:48
void AddModifier(NiPSysModifier *a_modifier)
Definition: NiParticleSystem.h:38
void SetSelectiveUpdateFlags(bool &a_selectiveUpdate, bool a_selectiveUpdateTransforms, bool &a_rigid) override
void LoadBinary(NiStream &a_stream) override
void LinkObject(NiStream &a_stream) override
float lastUpdate
Definition: NiParticleSystem.h:50
void ProcessClone(NiCloningProcess &a_cloning) override
void UpdateSelectedDownwardPass(NiUpdateData &a_data, std::uint32_t a_arg2) override
Definition: NiParticles.h:10
Definition: NiRTTI.h:6
Definition: NiStream.h:29
Definition: NiTPointerList.h:10
Definition: NiAVObject.h:28
Definition: AbsorbEffect.h:6
constexpr std::array< REL::ID, 1 > VTABLE_NiParticleSystem
Definition: Offsets_VTABLE.h:12299
constexpr REL::ID NiRTTI_NiParticleSystem(static_cast< std::uint64_t >(524465))
constexpr REL::ID RTTI_NiParticleSystem(static_cast< std::uint64_t >(690582))