CommonLibSSE NG
NiSkinPartition.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/M/MemoryManager.h"
4 #include "RE/N/NiGeometryData.h"
5 #include "RE/N/NiObject.h"
6 #include "RE/V/VertexDesc.h"
7 
8 namespace RE
9 {
10  struct ID3D11Buffer;
11 
12  namespace BSGraphics
13  {
14  struct TriShape
15  {
16  ID3D11Buffer* vertexBuffer; // 00
17  ID3D11Buffer* indexBuffer; // 08
19  volatile std::uint32_t refCount; // 18
20  std::uint32_t pad1C; // 1C
21  std::uint8_t* rawVertexData; // 20
22  std::uint16_t* rawIndexData; // 28
23  };
24  static_assert(sizeof(TriShape) == 0x30);
25  }
26 
27  class NiSkinPartition : public NiObject
28  {
29  public:
30  inline static constexpr auto RTTI = RTTI_NiSkinPartition;
31  inline static auto Ni_RTTI = NiRTTI_NiSkinPartition;
32 
33  class Partition
34  {
35  public:
37  std::uint16_t* bones; // 08
38  float* weights; // 10
39  std::uint16_t* vertexMap; // 18
40  std::uint8_t* bonePalette; // 20
41  std::uint16_t* triList; // 28
42  std::uint16_t* stripLengths; // 30
43  std::uint16_t vertices; // 38
44  std::uint16_t triangles; // 3A
45  std::uint16_t numBones; // 3C
46  std::uint16_t strips; // 3E
47  std::uint16_t bonesPerVertex; // 40
48  std::uint16_t pad42; // 42
49  float unk44; // 44
51  };
52  static_assert(sizeof(Partition) == 0x50);
53 
54  ~NiSkinPartition() override; // 00
55 
56  // override (NiObject)
57  const NiRTTI* GetRTTI() const override; // 02
58  void LoadBinary(NiStream& a_stream) override; // 18
59  void LinkObject(NiStream& a_stream) override; // 19 - { NiObject::LinkObject(a_stream); }
60  bool RegisterStreamables(NiStream& a_stream) override; // 1A - { return NiObject::RegisterStreamables(a_stream); }
61  void SaveBinary(NiStream& a_stream) override; // 1B
62  bool IsEqual(NiObject* a_object) override; // 1C
63 
64  // add
65  virtual void Unk_25(void); // 25
66 
67  // members
68  std::uint32_t numPartitions; // 10
69  std::uint32_t pad14; // 14
71  std::uint32_t vertexCount; // 20
72  std::uint32_t unk24; // 24
73  };
74  static_assert(sizeof(NiSkinPartition) == 0x28);
75 }
Definition: VertexDesc.h:53
Definition: NiObject.h:37
Definition: NiRTTI.h:6
Definition: NiSkinPartition.h:34
float unk44
Definition: NiSkinPartition.h:49
std::uint16_t strips
Definition: NiSkinPartition.h:46
std::uint8_t * bonePalette
Definition: NiSkinPartition.h:40
std::uint16_t numBones
Definition: NiSkinPartition.h:45
BSGraphics::VertexDesc vertexDesc
Definition: NiSkinPartition.h:36
std::uint16_t * vertexMap
Definition: NiSkinPartition.h:39
float * weights
Definition: NiSkinPartition.h:38
BSGraphics::TriShape * buffData
Definition: NiSkinPartition.h:50
std::uint16_t pad42
Definition: NiSkinPartition.h:48
std::uint16_t * stripLengths
Definition: NiSkinPartition.h:42
std::uint16_t * triList
Definition: NiSkinPartition.h:41
std::uint16_t vertices
Definition: NiSkinPartition.h:43
std::uint16_t * bones
Definition: NiSkinPartition.h:37
std::uint16_t triangles
Definition: NiSkinPartition.h:44
std::uint16_t bonesPerVertex
Definition: NiSkinPartition.h:47
Definition: NiSkinPartition.h:28
static constexpr auto RTTI
Definition: NiSkinPartition.h:30
std::uint32_t pad14
Definition: NiSkinPartition.h:69
~NiSkinPartition() override
std::uint32_t vertexCount
Definition: NiSkinPartition.h:71
std::uint32_t unk24
Definition: NiSkinPartition.h:72
virtual void Unk_25(void)
SimpleArray< Partition > partitions
Definition: NiSkinPartition.h:70
bool IsEqual(NiObject *a_object) override
bool RegisterStreamables(NiStream &a_stream) override
static auto Ni_RTTI
Definition: NiSkinPartition.h:31
std::uint32_t numPartitions
Definition: NiSkinPartition.h:68
void LoadBinary(NiStream &a_stream) override
const NiRTTI * GetRTTI() const override
void LinkObject(NiStream &a_stream) override
void SaveBinary(NiStream &a_stream) override
Definition: NiStream.h:29
Definition: MemoryManager.h:244
Definition: AbsorbEffect.h:6
constexpr REL::VariantID NiRTTI_NiSkinPartition(523974, 410554, 0x316c0b0)
constexpr REL::VariantID RTTI_NiSkinPartition(690441, 398296, 0x1f621d8)
Definition: NiSkinPartition.h:15
std::uint32_t pad1C
Definition: NiSkinPartition.h:20
ID3D11Buffer * indexBuffer
Definition: NiSkinPartition.h:17
std::uint8_t * rawVertexData
Definition: NiSkinPartition.h:21
volatile std::uint32_t refCount
Definition: NiSkinPartition.h:19
std::uint16_t * rawIndexData
Definition: NiSkinPartition.h:22
BSGraphics::VertexDesc vertexDesc
Definition: NiSkinPartition.h:18
ID3D11Buffer * vertexBuffer
Definition: NiSkinPartition.h:16