CommonLibSSE (powerof3)
NiGeometryData.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/N/NiBound.h"
4 #include "RE/N/NiObject.h"
5 
6 namespace RE
7 {
8  class NiAdditionalGeometryData;
9  class NiColorA;
10  class NiPoint2;
11  class NiPoint3;
12  class NiTriShapeData;
13  class NiTriStripsData;
14 
15  class NiGeometryData : public NiObject
16  {
17  public:
18  inline static constexpr auto RTTI = RTTI_NiGeometryData;
19  inline static constexpr auto Ni_RTTI = NiRTTI_NiGeometryData;
20  inline static constexpr auto VTABLE = VTABLE_NiGeometryData;
21 
22  enum class DataFlag
23  {
24  kNone = 0x0000,
25  kNDL = 1 << 12,
26  kMax = 1 << 13,
27  kATI = kNDL | kMax,
28  };
29 
30  enum class DirtyFlag
31  {
32  kVertex = 1 << 0,
33  kNormal = 1 << 1,
34  kColor = 1 << 2,
35  kTexture = 1 << 3,
36 
37  kMutable = 0,
38  kStatic = 1 << 14,
39  kVolatile = 1 << 15
40  };
41 
42  enum class KeepFlag
43  {
44  kXYZ = 1 << 0,
45  kNorm = 1 << 1,
46  kColor = 1 << 2,
47  kUV = 1 << 3,
48  kIndices = 1 << 4,
49  kBonedata = 1 << 5,
50 
52  };
53 
54  enum class CompressFlag
55  {
56  kNorm = 1 << 0,
57  kColor = 1 << 1,
58  kUV = 1 << 2,
59  kWeight = 1 << 3,
60  kPosition = 1 << 4,
61 
63  };
64 
65  ~NiGeometryData() override; // 00
66 
67  // override (NiObject)
68  const NiRTTI* GetRTTI() const override; // 02
69  void LoadBinary(NiStream& a_stream) override; // 18
70  void LinkObject(NiStream& a_stream) override; // 19
71  bool RegisterStreamables(NiStream& a_stream) override; // 1A
72  void SaveBinary(NiStream& a_stream) override; // 1B
73  bool IsEqual(NiObject* a_object) override; // 1C
74 
75  // add
76  virtual void SetActiveVertexCount(std::uint16_t a_count); // 25 - { return; }
77  [[nodiscard]] virtual std::uint16_t GetActiveVertexCount() const; // 26 - { return vertices; }
78  virtual NiTriStripsData* AsTriStripsData(); // 27 - { return 0; }
79  virtual NiTriShapeData* AsTriShapeData(); // 28 - { return 0; }
80  virtual void Unk_29(void) = 0; // 29
81 
82  // members
83  std::uint16_t vertices; // 10
84  std::uint16_t id; // 12
87  NiBound bound; // 18
88  NiPoint3* vertex; // 28
89  NiPoint3* normal; // 30
90  NiColorA* color; // 38
91  NiPoint2* texture; // 40
92  std::uint32_t unk48; // 48
93  std::uint32_t unk4C; // 4C
94  std::uint32_t unk50; // 50
95  std::uint32_t unk54; // 54
99  std::uint8_t unk62; // 62
100  std::uint8_t unk63; // 63
101  std::uint8_t unk64; // 64
102  std::uint8_t unk65; // 65
103  bool hasGeoData; // 66
104  std::uint8_t unk67; // 67
105  };
106  static_assert(sizeof(NiGeometryData) == 0x68);
107 }
Definition: NiBound.h:8
Definition: NiColor.h:281
Definition: NiGeometryData.h:16
DataFlag
Definition: NiGeometryData.h:23
const NiRTTI * GetRTTI() const override
std::uint32_t unk54
Definition: NiGeometryData.h:95
std::uint32_t unk48
Definition: NiGeometryData.h:92
virtual void SetActiveVertexCount(std::uint16_t a_count)
virtual NiTriStripsData * AsTriStripsData()
NiPoint3 * normal
Definition: NiGeometryData.h:89
CompressFlag
Definition: NiGeometryData.h:55
std::uint8_t unk65
Definition: NiGeometryData.h:102
KeepFlag
Definition: NiGeometryData.h:43
NiPoint2 * texture
Definition: NiGeometryData.h:91
std::uint8_t unk67
Definition: NiGeometryData.h:104
DirtyFlag
Definition: NiGeometryData.h:31
virtual std::uint16_t GetActiveVertexCount() const
virtual void Unk_29(void)=0
REX::EnumSet< KeepFlag, std::uint8_t > keepFlags
Definition: NiGeometryData.h:97
void SaveBinary(NiStream &a_stream) override
REX::EnumSet< CompressFlag, std::uint8_t > compressFlags
Definition: NiGeometryData.h:98
std::uint32_t unk4C
Definition: NiGeometryData.h:93
~NiGeometryData() override
std::uint32_t unk50
Definition: NiGeometryData.h:94
NiBound bound
Definition: NiGeometryData.h:87
std::uint16_t vertices
Definition: NiGeometryData.h:83
REX::EnumSet< DataFlag, std::uint16_t > dataFlags
Definition: NiGeometryData.h:86
virtual NiTriShapeData * AsTriShapeData()
static constexpr auto Ni_RTTI
Definition: NiGeometryData.h:19
REX::EnumSet< DirtyFlag, std::uint16_t > dirtyFlags
Definition: NiGeometryData.h:85
std::uint16_t id
Definition: NiGeometryData.h:84
bool IsEqual(NiObject *a_object) override
std::uint8_t unk63
Definition: NiGeometryData.h:100
NiPointer< NiAdditionalGeometryData > additionalGeomData
Definition: NiGeometryData.h:96
static constexpr auto VTABLE
Definition: NiGeometryData.h:20
void LoadBinary(NiStream &a_stream) override
std::uint8_t unk64
Definition: NiGeometryData.h:101
std::uint8_t unk62
Definition: NiGeometryData.h:99
static constexpr auto RTTI
Definition: NiGeometryData.h:18
void LinkObject(NiStream &a_stream) override
bool hasGeoData
Definition: NiGeometryData.h:103
bool RegisterStreamables(NiStream &a_stream) override
NiColorA * color
Definition: NiGeometryData.h:90
NiPoint3 * vertex
Definition: NiGeometryData.h:88
Definition: NiObject.h:37
Definition: NiPoint2.h:6
Definition: NiPoint3.h:6
Definition: NiRTTI.h:6
Definition: NiStream.h:29
Definition: AbsorbEffect.h:6
constexpr REL::ID NiRTTI_NiGeometryData(static_cast< std::uint64_t >(523949))
constexpr REL::ID RTTI_NiGeometryData(static_cast< std::uint64_t >(690432))
constexpr std::array< REL::ID, 1 > VTABLE_NiGeometryData
Definition: Offsets_VTABLE.h:12216