CommonLibSSE (powerof3)
NiObject.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/N/NiRefObject.h"
4 #include "RE/N/NiSmartPointer.h"
5 
6 namespace 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  static_assert(sizeof(NiObject) == 0x10);
85 }
Definition: BSDynamicTriShape.h:8
Definition: BSFadeNode.h:11
Definition: BSGeometry.h:15
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 BSSubIndexTriShape * AsSubIndexTriShape()
Definition: NiObject.h:55
virtual void ProcessClone(NiCloningProcess &a_cloning)
virtual BSDynamicTriShape * AsDynamicTriShape()
Definition: NiObject.h:56
virtual bhkRigidBody * AsBhkRigidBody()
Definition: NiObject.h:65
virtual BSLines * AsLinesGeom()
Definition: NiObject.h:61
~NiObject() override=default
virtual bool IsEqual(NiObject *a_object)
virtual bhkBlendCollisionObject * AsBhkBlendCollisionObject()
Definition: NiObject.h:63
virtual BSGeometry * AsGeometry()
Definition: NiObject.h:51
virtual bhkLimitedHingeConstraint * AsBhkLimitedHingeConstraint()
Definition: NiObject.h:66
virtual BSMultiBoundNode * AsMultiBoundNode()
Definition: NiObject.h:50
void CreateDeepCopy(NiPointer< NiObject > &a_object)
virtual std::uint32_t GetBlockAllocationSize() const
Definition: NiObject.h:77
static constexpr auto RTTI
Definition: NiObject.h:39
virtual bhkAttachmentCollisionObject * AsBhkAttachmentCollisionObject()
Definition: NiObject.h:64
virtual NiParticles * AsParticlesGeom()
Definition: NiObject.h:60
static constexpr auto Ni_RTTI
Definition: NiObject.h:40
virtual NiTriStrips * AsTriStrips()
Definition: NiObject.h:52
virtual NiTriShape * AsNiTriShape()
Definition: NiObject.h:59
virtual const NiRTTI * GetStreamableRTTI() const
Definition: NiObject.h:76
static constexpr auto VTABLE
Definition: NiObject.h:41
virtual bool StreamCanSkip()
Definition: NiObject.h:75
virtual NiObject * CreateClone([[maybe_unused]] NiCloningProcess &a_cloning)
Definition: NiObject.h:67
virtual const NiRTTI * GetRTTI() const
virtual bhkNiCollisionObject * AsBhkNiCollisionObject()
Definition: NiObject.h:62
virtual NiObjectGroup * GetGroup() const
Definition: NiObject.h:78
virtual void SaveBinary([[maybe_unused]] NiStream &a_stream)
Definition: NiObject.h:71
virtual NiSwitchNode * AsSwitchNode()
Definition: NiObject.h:48
virtual NiControllerManager * AsNiControllerManager()
Definition: NiObject.h:80
virtual NiGeometry * AsNiGeometry()
Definition: NiObject.h:57
virtual void LoadBinary([[maybe_unused]] NiStream &a_stream)
Definition: NiObject.h:68
virtual BSSegmentedTriShape * AsSegmentedTriShape()
Definition: NiObject.h:54
virtual NiTriBasedGeom * AsNiTriBasedGeom()
Definition: NiObject.h:58
virtual bool RegisterStreamables(NiStream &a_stream)
virtual void LinkObject([[maybe_unused]] NiStream &a_stream)
Definition: NiObject.h:69
virtual BSFadeNode * AsFadeNode()
Definition: NiObject.h:49
virtual void PostLinkObject([[maybe_unused]] NiStream &a_stream)
Definition: NiObject.h:74
virtual NiNode * AsNode()
Definition: NiObject.h:47
virtual void SetGroup([[maybe_unused]] NiObjectGroup *a_group)
Definition: NiObject.h:79
virtual BSTriShape * AsTriShape()
Definition: NiObject.h:53
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
NiSmartPointer(Actor)
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))