CommonLibVR
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 constexpr auto Ni_RTTI = NiRTTI_NiSkinPartition;
32  inline static constexpr auto VTABLE = VTABLE_NiSkinPartition;
33 
34  class Partition
35  {
36  public:
38  std::uint16_t* bones; // 08
39  float* weights; // 10
40  std::uint16_t* vertexMap; // 18
41  std::uint8_t* bonePalette; // 20
42  std::uint16_t* triList; // 28
43  std::uint16_t* stripLengths; // 30
44  std::uint16_t vertices; // 38
45  std::uint16_t triangles; // 3A
46  std::uint16_t numBones; // 3C
47  std::uint16_t strips; // 3E
48  std::uint16_t bonesPerVertex; // 40
49  std::uint16_t pad42; // 42
50  float unk44; // 44
52  };
53  static_assert(sizeof(Partition) == 0x50);
54 
55  ~NiSkinPartition() override; // 00
56 
57  // override (NiObject)
58  const NiRTTI* GetRTTI() const override; // 02
59  void LoadBinary(NiStream& a_stream) override; // 18
60  void LinkObject(NiStream& a_stream) override; // 19 - { NiObject::LinkObject(a_stream); }
61  bool RegisterStreamables(NiStream& a_stream) override; // 1A - { return NiObject::RegisterStreamables(a_stream); }
62  void SaveBinary(NiStream& a_stream) override; // 1B
63  bool IsEqual(NiObject* a_object) override; // 1C
64 
65  // add
66  virtual void Unk_25(void); // 25
67 
68  // members
69  std::uint32_t numPartitions; // 10
70  std::uint32_t pad14; // 14
72  std::uint32_t vertexCount; // 20
73  std::uint32_t unk24; // 24
74  private:
75  KEEP_FOR_RE()
76  };
77  static_assert(sizeof(NiSkinPartition) == 0x28);
78 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: VertexDesc.h:53
Definition: NiObject.h:37
Definition: NiRTTI.h:6
Definition: NiSkinPartition.h:35
float unk44
Definition: NiSkinPartition.h:50
std::uint16_t strips
Definition: NiSkinPartition.h:47
std::uint8_t * bonePalette
Definition: NiSkinPartition.h:41
std::uint16_t numBones
Definition: NiSkinPartition.h:46
BSGraphics::VertexDesc vertexDesc
Definition: NiSkinPartition.h:37
std::uint16_t * vertexMap
Definition: NiSkinPartition.h:40
float * weights
Definition: NiSkinPartition.h:39
BSGraphics::TriShape * buffData
Definition: NiSkinPartition.h:51
std::uint16_t pad42
Definition: NiSkinPartition.h:49
std::uint16_t * stripLengths
Definition: NiSkinPartition.h:43
std::uint16_t * triList
Definition: NiSkinPartition.h:42
std::uint16_t vertices
Definition: NiSkinPartition.h:44
std::uint16_t * bones
Definition: NiSkinPartition.h:38
std::uint16_t triangles
Definition: NiSkinPartition.h:45
std::uint16_t bonesPerVertex
Definition: NiSkinPartition.h:48
Definition: NiSkinPartition.h:28
static constexpr auto VTABLE
Definition: NiSkinPartition.h:32
static constexpr auto RTTI
Definition: NiSkinPartition.h:30
std::uint32_t pad14
Definition: NiSkinPartition.h:70
~NiSkinPartition() override
std::uint32_t vertexCount
Definition: NiSkinPartition.h:72
std::uint32_t unk24
Definition: NiSkinPartition.h:73
virtual void Unk_25(void)
SimpleArray< Partition > partitions
Definition: NiSkinPartition.h:71
bool IsEqual(NiObject *a_object) override
bool RegisterStreamables(NiStream &a_stream) override
std::uint32_t numPartitions
Definition: NiSkinPartition.h:69
static constexpr auto Ni_RTTI
Definition: NiSkinPartition.h:31
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 std::array< REL::ID, 1 > VTABLE_NiSkinPartition
Definition: Offsets_VTABLE.h:12321
constexpr REL::ID RTTI_NiSkinPartition(static_cast< std::uint64_t >(690441))
constexpr REL::ID NiRTTI_NiSkinPartition(static_cast< std::uint64_t >(523974))
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