CommonLibSSE NG
BSTriShape.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSGeometry.h"
4 
5 namespace RE
6 {
7  class BSTriShape : public BSGeometry
8  {
9  public:
10  inline static constexpr auto RTTI = RTTI_BSTriShape;
11  inline static auto Ni_RTTI = NiRTTI_BSTriShape;
12 
14  {
15 #define RUNTIME_DATA_CONTENT \
16  std::uint16_t triangleCount; /* 0 */ \
17  std::uint16_t vertexCount; /* 2 */ \
18  std::uint32_t pad15C; /* 3 */
19 
21  };
22  static_assert(sizeof(TRISHAPE_RUNTIME_DATA) == 0x8);
23 
24  ~BSTriShape() override; // 00
25 
26  // override (BSGeometry)
27  const NiRTTI* GetRTTI() const override; // 02
28  BSTriShape* AsTriShape() override; // 09
29  NiObject* CreateClone(NiCloningProcess& a_cloning) override; // 17
30  void LoadBinary(NiStream& a_stream) override; // 18
31  void LinkObject(NiStream& a_stream) override; // 19 - { BSGeometry::LinkObject(a_stream); }
32  bool RegisterStreamables(NiStream& a_stream) override; // 1A - { return BSGeometry::RegisterStreamables(a_stream); }
33  void SaveBinary(NiStream& a_stream) override; // 1B
34  bool IsEqual(NiObject* a_object) override; // 1C - { return false; }
35 
36  [[nodiscard]] inline TRISHAPE_RUNTIME_DATA& GetTrishapeRuntimeData() noexcept
37  {
38  return REL::RelocateMember<TRISHAPE_RUNTIME_DATA>(this, 0x158, 0x1A0);
39  }
40 
41  [[nodiscard]] inline const TRISHAPE_RUNTIME_DATA& GetTrishapeRuntimeData() const noexcept
42  {
43  return REL::RelocateMember<TRISHAPE_RUNTIME_DATA>(this, 0x158, 0x1A0);
44  }
45 
46  // members
47 #ifndef SKYRIM_CROSS_VR
48  RUNTIME_DATA_CONTENT // 158, 1A0
49 #endif
50  };
51 #ifndef ENABLE_SKYRIM_VR
52  static_assert(sizeof(BSTriShape) == 0x160);
53 #elif !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)
54  static_assert(sizeof(BSTriShape) == 0x1A8);
55 #endif
56 }
57 #undef RUNTIME_DATA_CONTENT
Definition: BSGeometry.h:15
RUNTIME_DATA_CONTENT
Definition: BSGeometry.h:141
Definition: BSTriShape.h:8
bool IsEqual(NiObject *a_object) override
BSTriShape * AsTriShape() override
static auto Ni_RTTI
Definition: BSTriShape.h:11
TRISHAPE_RUNTIME_DATA & GetTrishapeRuntimeData() noexcept
Definition: BSTriShape.h:36
void LoadBinary(NiStream &a_stream) override
void LinkObject(NiStream &a_stream) override
bool RegisterStreamables(NiStream &a_stream) override
static constexpr auto RTTI
Definition: BSTriShape.h:10
const TRISHAPE_RUNTIME_DATA & GetTrishapeRuntimeData() const noexcept
Definition: BSTriShape.h:41
~BSTriShape() override
NiObject * CreateClone(NiCloningProcess &a_cloning) override
void SaveBinary(NiStream &a_stream) override
const NiRTTI * GetRTTI() const override
Definition: NiCloningProcess.h:10
Definition: NiObject.h:37
Definition: NiRTTI.h:6
Definition: NiStream.h:29
Definition: AbsorbEffect.h:6
constexpr REL::VariantID NiRTTI_BSTriShape(523928, 410508, 0x316adb0)
constexpr REL::VariantID RTTI_BSTriShape(685042, 392796, 0x1ede788)
Definition: BSTriShape.h:14