CommonLibVR
BSTerrainEffect.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSPointerHandle.h"
4 #include "RE/B/BSTEvent.h"
5 #include "RE/B/BSTempEffect.h"
6 #include "RE/I/ID.h"
7 #include "RE/N/NiQuaternion.h"
8 #include "RE/N/NiSmartPointer.h"
9 
10 namespace RE
11 {
12  class bhkWorld;
13  class NiAVObject;
14  struct PositionPlayerEvent;
15 
17  public BSTempEffect, // 00
18  public BSTEventSink<PositionPlayerEvent> // 30
19  {
20  public:
21  inline static constexpr auto RTTI = RTTI_BSTerrainEffect;
22  inline static constexpr auto VTABLE = VTABLE_BSTerrainEffect;
23  inline static constexpr auto TYPE = TEMP_EFFECT_TYPE::kTerrain;
24 
26  {
27  public:
28  // members
30  NiAVObject* bone; // 28
31  float zOffset; // 30
32  };
33  static_assert(sizeof(BoneAdjustment) == 0x38);
34 
35  ~BSTerrainEffect() override; // 00
36 
37  // override (BSTempEffect)
38  bool Update(float a_arg1) override; // 28
39  [[nodiscard]] bool GetManagerHandlesSaveLoad() const override; // 2A
40  [[nodiscard]] TEMP_EFFECT_TYPE GetType() const override; // 2C - { return 0; }
41  void SaveGame(BGSSaveGameBuffer* a_buf) override; // 2D
42  void LoadGame(BGSLoadGameBuffer* a_buf) override; // 2E
43 
44  // add
45  virtual bool SetupTerrainEffect(const char* a_modelName, ObjectRefHandle& a_handle, std::uint32_t a_collisionFilter);
46 
47  // override (BSTEventSink<PositionPlayerEvent>)
48  BSEventNotifyControl ProcessEvent(const PositionPlayerEvent* a_event, BSTEventSource<PositionPlayerEvent>* a_eventSource) override; // 01 - { return BSEventNotifyControl::kContinue; }
49 
50  // members;
53  std::uint32_t pad54; // 54
60  std::uint32_t collisionFilter; // A8
61  std::uint32_t padAC; // AC
63  private:
64  KEEP_FOR_RE()
65  };
66  static_assert(sizeof(BSTerrainEffect) == 0xB8);
67 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: BGSLoadGameBuffer.h:6
Definition: BGSSaveGameBuffer.h:10
Definition: BSTArray.h:378
Definition: BSTEvent.h:143
Definition: BSTempEffect.h:29
Definition: BSTerrainEffect.h:19
virtual bool SetupTerrainEffect(const char *a_modelName, ObjectRefHandle &a_handle, std::uint32_t a_collisionFilter)
static constexpr auto RTTI
Definition: BSTerrainEffect.h:21
BSResource::ID modelID
Definition: BSTerrainEffect.h:57
~BSTerrainEffect() override
NiPoint3 location
Definition: BSTerrainEffect.h:52
bool Update(float a_arg1) override
TEMP_EFFECT_TYPE GetType() const override
std::uint32_t pad54
Definition: BSTerrainEffect.h:53
std::uint32_t collisionFilter
Definition: BSTerrainEffect.h:60
BSTArray< BoneAdjustment > dynamicAdjustments
Definition: BSTerrainEffect.h:55
ObjectRefHandle target
Definition: BSTerrainEffect.h:58
std::uint32_t padAC
Definition: BSTerrainEffect.h:61
NiPointer< NiAVObject > model
Definition: BSTerrainEffect.h:56
NiPointer< bhkWorld > physicsWorld
Definition: BSTerrainEffect.h:59
static constexpr auto TYPE
Definition: BSTerrainEffect.h:23
NiPointer< NiAVObject > followNode
Definition: BSTerrainEffect.h:62
BSTArray< BoneAdjustment > terrainAdjustments
Definition: BSTerrainEffect.h:54
bool GetManagerHandlesSaveLoad() const override
static constexpr auto VTABLE
Definition: BSTerrainEffect.h:22
void SaveGame(BGSSaveGameBuffer *a_buf) override
NiQuaternion orientation
Definition: BSTerrainEffect.h:51
BSEventNotifyControl ProcessEvent(const PositionPlayerEvent *a_event, BSTEventSource< PositionPlayerEvent > *a_eventSource) override
void LoadGame(BGSLoadGameBuffer *a_buf) override
Definition: NiAVObject.h:57
Definition: NiMatrix3.h:8
Definition: NiPoint3.h:6
Definition: NiSmartPointer.h:9
Definition: NiQuaternion.h:6
Definition: AbsorbEffect.h:6
TEMP_EFFECT_TYPE
Definition: BSTempEffect.h:13
constexpr std::array< REL::ID, 2 > VTABLE_BSTerrainEffect
Definition: Offsets_VTABLE.h:10547
constexpr REL::ID RTTI_BSTerrainEffect(static_cast< std::uint64_t >(686060))
BSEventNotifyControl
Definition: BSTEvent.h:12
Definition: ID.h:10
Definition: BSTerrainEffect.h:26
float zOffset
Definition: BSTerrainEffect.h:31
NiAVObject * bone
Definition: BSTerrainEffect.h:30
NiMatrix3 rotation
Definition: BSTerrainEffect.h:29
Definition: PositionPlayerEvent.h:7