CommonLibSSE NG
BSMultiIndexTriShape.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSTriShape.h"
4 #include "RE/N/NiColor.h"
5 #include "RE/N/NiSmartPointer.h"
6 
7 #include "REX/W32/D3D.h"
8 
9 namespace RE
10 {
11  namespace BSGraphics
12  {
13  class IndexBuffer;
14  }
15 
16  class BSShaderProperty;
17 
19  {
20  public:
21  inline static constexpr auto RTTI = RTTI_BSMultiIndexTriShape;
22  inline static auto Ni_RTTI = NiRTTI_BSMultiIndexTriShape;
23 
25  {
26 #define RUNTIME_DATA_CONTENT \
27  BSGraphics::IndexBuffer* altIndexBuffer; /* 00 */ \
28  std::uint32_t altPrimCount; /* 08 */ \
29  REX::W32::XMFLOAT4X4 materialProjection; /* 0C */ \
30  std::uint32_t pad1AC; /* 4C */ \
31  NiPointer<BSShaderProperty> additionalShaderProperty; /* 50 */ \
32  std::uint8_t useAdditionalTriList; /* 58 */ \
33  std::uint8_t pad1B9; /* 59 */ \
34  std::uint16_t pad1BA; /* 5A */ \
35  NiColorA materialParams; /* 5C */ \
36  float materialScale; /* 6C */ \
37  float normalDampener; /* 70 */ \
38  std::uint32_t unk1D4; /* 74 */
39 
41  };
42  static_assert(sizeof(MULTI_INDEX_TRISHAPE_RUNTIME_DATA) == 0x78);
43 
44  ~BSMultiIndexTriShape() override; // 00
45 
46  // override (BSGeometry)
47  const NiRTTI* GetRTTI() const override; // 02
48  NiObject* CreateClone(NiCloningProcess& a_cloning) override; // 17
49 #if !defined(ENABLE_SKYRIM_VR) || (!defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_VR))
50  // Compatibility between VR and non-VR breaks beyond this point.
51  BSMultiIndexTriShape* AsMultiIndexTriShape() override; // 35 - { return this; }
52 #endif
53 
55  {
56  return REL::RelocateMember<MULTI_INDEX_TRISHAPE_RUNTIME_DATA>(this, 0x160, 0x1A8);
57  }
58 
59  [[nodiscard]] inline const MULTI_INDEX_TRISHAPE_RUNTIME_DATA& GetMultiIndexTrishapeRuntimeData() const noexcept
60  {
61  return REL::RelocateMember<MULTI_INDEX_TRISHAPE_RUNTIME_DATA>(this, 0x160, 0x1A8);
62  }
63 
64  // members
65 #ifndef SKYRIM_CROSS_VR
66  RUNTIME_DATA_CONTENT // 160, 1A8
67 #endif
68  };
69 #ifndef ENABLE_SKYRIM_VR
70  static_assert(sizeof(BSMultiIndexTriShape) == 0x1D8);
71 #elif !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)
72  static_assert(sizeof(BSMultiIndexTriShape) == 0x220);
73 #endif
74 }
75 #undef RUNTIME_DATA_CONTENT
RUNTIME_DATA_CONTENT
Definition: BSGeometry.h:141
Definition: BSMultiIndexTriShape.h:19
BSMultiIndexTriShape * AsMultiIndexTriShape() override
const MULTI_INDEX_TRISHAPE_RUNTIME_DATA & GetMultiIndexTrishapeRuntimeData() const noexcept
Definition: BSMultiIndexTriShape.h:59
MULTI_INDEX_TRISHAPE_RUNTIME_DATA & GetMultiIndexTrishapeRuntimeData() noexcept
Definition: BSMultiIndexTriShape.h:54
const NiRTTI * GetRTTI() const override
NiObject * CreateClone(NiCloningProcess &a_cloning) override
static constexpr auto RTTI
Definition: BSMultiIndexTriShape.h:21
~BSMultiIndexTriShape() override
static auto Ni_RTTI
Definition: BSMultiIndexTriShape.h:22
Definition: BSShaderProperty.h:17
Definition: BSTriShape.h:8
Definition: NiCloningProcess.h:10
Definition: NiObject.h:37
Definition: NiRTTI.h:6
Definition: AbsorbEffect.h:6
constexpr REL::VariantID RTTI_BSMultiIndexTriShape(692088, 400132, 0x1f80ad8)
constexpr REL::VariantID NiRTTI_BSMultiIndexTriShape(528364, 415310, 0x36f1aa0)