CommonLibVR
Loading...
Searching...
No Matches
NiObject.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/N/NiRefObject.h"
5
6namespace RE
7{
8 class BSDynamicTriShape;
9 class BSFadeNode;
10 class BSGeometry;
11 class bhkAttachmentCollisionObject;
12 class bhkBlendCollisionObject;
13 class bhkLimitedHingeConstraint;
14 class bhkNiCollisionObject;
15 class bhkRigidBody;
16 class BSLines;
17 class BSMultiBoundNode;
18 class BSSegmentedTriShape;
19 class BSSubIndexTriShape;
20 class BSTriShape;
21 class NiCloningProcess;
22 class NiControllerManager;
23 class NiGeometry;
24 class NiNode;
25 class NiObjectGroup;
26 class NiParticles;
27 class NiRTTI;
28 class NiStream;
29 class NiSwitchNode;
30 class NiTriBasedGeom;
31 class NiTriShape;
32 class NiTriStrips;
33
35
36 class NiObject : public NiRefObject
37 {
38 public:
39 inline static constexpr auto RTTI = RTTI_NiObject;
40 inline static constexpr auto Ni_RTTI = NiRTTI_NiObject;
41 inline static constexpr auto VTABLE = VTABLE_NiObject;
42
43 ~NiObject() override = default; // 00
44
45 // add
46 [[nodiscard]] virtual const NiRTTI* GetRTTI() const; // 02
47 virtual NiNode* AsNode() { return nullptr; } // 03
48 virtual NiSwitchNode* AsSwitchNode() { return nullptr; } // 04
49 virtual BSFadeNode* AsFadeNode() { return nullptr; } // 05
50 virtual BSMultiBoundNode* AsMultiBoundNode() { return nullptr; } // 06
51 virtual BSGeometry* AsGeometry() { return nullptr; } // 07
52 virtual NiTriStrips* AsTriStrips() { return nullptr; } // 08
53 virtual BSTriShape* AsTriShape() { return nullptr; } // 09
54 virtual BSSegmentedTriShape* AsSegmentedTriShape() { return nullptr; } // 0A
55 virtual BSSubIndexTriShape* AsSubIndexTriShape() { return nullptr; } // 0B
56 virtual BSDynamicTriShape* AsDynamicTriShape() { return nullptr; } // 0C
57 virtual NiGeometry* AsNiGeometry() { return nullptr; } // 0D
58 virtual NiTriBasedGeom* AsNiTriBasedGeom() { return nullptr; } // 0E
59 virtual NiTriShape* AsNiTriShape() { return nullptr; } // 0F
60 virtual NiParticles* AsParticlesGeom() { return nullptr; } // 10
61 virtual BSLines* AsLinesGeom() { return nullptr; } // 11
62 virtual bhkNiCollisionObject* AsBhkNiCollisionObject() { return nullptr; } // 12
63 virtual bhkBlendCollisionObject* AsBhkBlendCollisionObject() { return nullptr; } // 13
64 virtual bhkAttachmentCollisionObject* AsBhkAttachmentCollisionObject() { return nullptr; } // 14
65 virtual bhkRigidBody* AsBhkRigidBody() { return nullptr; } // 15
66 virtual bhkLimitedHingeConstraint* AsBhkLimitedHingeConstraint() { return nullptr; } // 16
67 virtual NiObject* CreateClone([[maybe_unused]] NiCloningProcess& a_cloning) { return this; } // 17
68 virtual void LoadBinary([[maybe_unused]] NiStream& a_stream) { return; } // 18
69 virtual void LinkObject([[maybe_unused]] NiStream& a_stream) { return; } // 19
70 virtual bool RegisterStreamables(NiStream& a_stream); // 1A
71 virtual void SaveBinary([[maybe_unused]] NiStream& a_stream) { return; } // 1B
72 virtual bool IsEqual(NiObject* a_object); // 1C
73 virtual void ProcessClone(NiCloningProcess& a_cloning); // 1D
74 virtual void PostLinkObject([[maybe_unused]] NiStream& a_stream) { return; } // 1E
75 virtual bool StreamCanSkip() { return false; } // 1F
76 [[nodiscard]] virtual const NiRTTI* GetStreamableRTTI() const { return GetRTTI(); } // 20
77 [[nodiscard]] virtual std::uint32_t GetBlockAllocationSize() const { return 0; } // 21
78 [[nodiscard]] virtual NiObjectGroup* GetGroup() const { return nullptr; } // 22
79 virtual void SetGroup([[maybe_unused]] NiObjectGroup* a_group) { return; } // 23
80 virtual NiControllerManager* AsNiControllerManager() { return nullptr; } // 24
81
83
84 private:
86 };
87 static_assert(sizeof(NiObject) == 0x10);
88}
#define NiSmartPointer(className)
Definition NiSmartPointer.h:251
#define KEEP_FOR_RE()
Definition PCH.h:517
Definition BSDynamicTriShape.h:8
Definition BSFadeNode.h:11
Definition BSGeometry.h:17
Definition BSMultiBoundNode.h:14
Definition BSTriShape.h:8
Definition NiCloningProcess.h:10
Definition NiControllerManager.h:17
Definition NiGeometry.h:11
Definition NiNode.h:12
Definition NiObjectGroup.h:6
Definition NiObject.h:37
virtual bhkRigidBody * AsBhkRigidBody()
Definition NiObject.h:65
virtual bhkLimitedHingeConstraint * AsBhkLimitedHingeConstraint()
Definition NiObject.h:66
virtual void LoadBinary(NiStream &a_stream)
Definition NiObject.h:68
virtual NiObject * CreateClone(NiCloningProcess &a_cloning)
Definition NiObject.h:67
virtual void ProcessClone(NiCloningProcess &a_cloning)
virtual BSDynamicTriShape * AsDynamicTriShape()
Definition NiObject.h:56
virtual BSSegmentedTriShape * AsSegmentedTriShape()
Definition NiObject.h:54
virtual BSSubIndexTriShape * AsSubIndexTriShape()
Definition NiObject.h:55
~NiObject() override=default
virtual bool IsEqual(NiObject *a_object)
virtual NiTriStrips * AsTriStrips()
Definition NiObject.h:52
virtual void LinkObject(NiStream &a_stream)
Definition NiObject.h:69
virtual bhkAttachmentCollisionObject * AsBhkAttachmentCollisionObject()
Definition NiObject.h:64
virtual NiSwitchNode * AsSwitchNode()
Definition NiObject.h:48
virtual void PostLinkObject(NiStream &a_stream)
Definition NiObject.h:74
virtual NiTriShape * AsNiTriShape()
Definition NiObject.h:59
void CreateDeepCopy(NiPointer< NiObject > &a_object)
virtual std::uint32_t GetBlockAllocationSize() const
Definition NiObject.h:77
virtual NiParticles * AsParticlesGeom()
Definition NiObject.h:60
static constexpr auto RTTI
Definition NiObject.h:39
static constexpr auto Ni_RTTI
Definition NiObject.h:40
static constexpr auto VTABLE
Definition NiObject.h:41
virtual bool StreamCanSkip()
Definition NiObject.h:75
virtual const NiRTTI * GetStreamableRTTI() const
Definition NiObject.h:76
virtual NiObjectGroup * GetGroup() const
Definition NiObject.h:78
virtual NiNode * AsNode()
Definition NiObject.h:47
virtual BSMultiBoundNode * AsMultiBoundNode()
Definition NiObject.h:50
virtual bhkNiCollisionObject * AsBhkNiCollisionObject()
Definition NiObject.h:62
virtual BSFadeNode * AsFadeNode()
Definition NiObject.h:49
virtual BSGeometry * AsGeometry()
Definition NiObject.h:51
virtual const NiRTTI * GetRTTI() const
virtual void SaveBinary(NiStream &a_stream)
Definition NiObject.h:71
virtual NiTriBasedGeom * AsNiTriBasedGeom()
Definition NiObject.h:58
virtual NiControllerManager * AsNiControllerManager()
Definition NiObject.h:80
virtual bhkBlendCollisionObject * AsBhkBlendCollisionObject()
Definition NiObject.h:63
virtual bool RegisterStreamables(NiStream &a_stream)
virtual BSTriShape * AsTriShape()
Definition NiObject.h:53
virtual NiGeometry * AsNiGeometry()
Definition NiObject.h:57
virtual void SetGroup(NiObjectGroup *a_group)
Definition NiObject.h:79
virtual BSLines * AsLinesGeom()
Definition NiObject.h:61
Definition NiParticles.h:10
Definition NiSmartPointer.h:9
Definition NiRTTI.h:6
Definition NiRefObject.h:8
Definition NiStream.h:29
Definition NiTriShape.h:8
Definition bhkNiCollisionObject.h:11
Definition bhkRigidBody.h:15
Definition AbsorbEffect.h:6
constexpr REL::ID RTTI_NiObject(static_cast< std::uint64_t >(684825))
constexpr std::array< REL::ID, 1 > VTABLE_NiObject
Definition Offsets_VTABLE.h:12239
constexpr REL::ID NiRTTI_NiObject(static_cast< std::uint64_t >(523891))