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