CommonLibSSE (Parapets fork)
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 
42  ~NiObject() override = default; // 00
43 
44  // add
45  [[nodiscard]] virtual const NiRTTI* GetRTTI() const; // 02
46  virtual NiNode* AsNode() { return nullptr; } // 03
47  virtual NiSwitchNode* AsSwitchNode() { return nullptr; } // 04
48  virtual BSFadeNode* AsFadeNode() { return nullptr; } // 05
49  virtual BSMultiBoundNode* AsMultiBoundNode() { return nullptr; } // 06
50  virtual BSGeometry* AsGeometry() { return nullptr; } // 07
51  virtual NiTriStrips* AsTriStrips() { return nullptr; } // 08
52  virtual BSTriShape* AsTriShape() { return nullptr; } // 09
53  virtual BSSegmentedTriShape* AsSegmentedTriShape() { return nullptr; } // 0A
54  virtual BSSubIndexTriShape* AsSubIndexTriShape() { return nullptr; } // 0B
55  virtual BSDynamicTriShape* AsDynamicTriShape() { return nullptr; } // 0C
56  virtual NiGeometry* AsNiGeometry() { return nullptr; } // 0D
57  virtual NiTriBasedGeom* AsNiTriBasedGeom() { return nullptr; } // 0E
58  virtual NiTriShape* AsNiTriShape() { return nullptr; } // 0F
59  virtual NiParticles* AsParticlesGeom() { return nullptr; } // 10
60  virtual BSLines* AsLinesGeom() { return nullptr; } // 11
61  virtual bhkNiCollisionObject* AsBhkNiCollisionObject() { return nullptr; } // 12
62  virtual bhkBlendCollisionObject* AsBhkBlendCollisionObject() { return nullptr; } // 13
63  virtual bhkAttachmentCollisionObject* AsBhkAttachmentCollisionObject() { return nullptr; } // 14
64  virtual bhkRigidBody* AsBhkRigidBody() { return nullptr; } // 15
65  virtual bhkLimitedHingeConstraint* AsBhkLimitedHingeConstraint() { return nullptr; } // 16
66  virtual NiObject* CreateClone([[maybe_unused]] NiCloningProcess& a_cloning) { return this; } // 17
67  virtual void LoadBinary([[maybe_unused]] NiStream& a_stream) { return; } // 18
68  virtual void LinkObject([[maybe_unused]] NiStream& a_stream) { return; } // 19
69  virtual bool RegisterStreamables(NiStream& a_stream); // 1A
70  virtual void SaveBinary([[maybe_unused]] NiStream& a_stream) { return; } // 1B
71  virtual bool IsEqual(NiObject* a_object); // 1C
72  virtual void ProcessClone(NiCloningProcess& a_cloning); // 1D
73  virtual void PostLinkObject([[maybe_unused]] NiStream& a_stream) { return; } // 1E
74  virtual bool StreamCanSkip() { return false; } // 1F
75  [[nodiscard]] virtual const NiRTTI* GetStreamableRTTI() const { return GetRTTI(); } // 20
76  [[nodiscard]] virtual std::uint32_t GetBlockAllocationSize() const { return 0; } // 21
77  [[nodiscard]] virtual NiObjectGroup* GetGroup() const { return nullptr; } // 22
78  virtual void SetGroup([[maybe_unused]] NiObjectGroup* a_group) { return; } // 23
79  virtual NiControllerManager* AsNiControllerManager() { return nullptr; } // 24
80 
82  };
83  static_assert(sizeof(NiObject) == 0x10);
84 }
Definition: BSFadeNode.h:11
Definition: BSGeometry.h:14
Definition: BSMultiBoundNode.h:14
Definition: BSTriShape.h:8
Definition: NiControllerManager.h:17
Definition: NiNode.h:12
Definition: NiObject.h:37
virtual BSSubIndexTriShape * AsSubIndexTriShape()
Definition: NiObject.h:54
virtual void ProcessClone(NiCloningProcess &a_cloning)
virtual BSDynamicTriShape * AsDynamicTriShape()
Definition: NiObject.h:55
virtual bhkRigidBody * AsBhkRigidBody()
Definition: NiObject.h:64
virtual BSLines * AsLinesGeom()
Definition: NiObject.h:60
~NiObject() override=default
virtual bool IsEqual(NiObject *a_object)
virtual bhkBlendCollisionObject * AsBhkBlendCollisionObject()
Definition: NiObject.h:62
virtual BSGeometry * AsGeometry()
Definition: NiObject.h:50
virtual bhkLimitedHingeConstraint * AsBhkLimitedHingeConstraint()
Definition: NiObject.h:65
virtual BSMultiBoundNode * AsMultiBoundNode()
Definition: NiObject.h:49
void CreateDeepCopy(NiPointer< NiObject > &a_object)
virtual std::uint32_t GetBlockAllocationSize() const
Definition: NiObject.h:76
static constexpr auto RTTI
Definition: NiObject.h:39
virtual bhkAttachmentCollisionObject * AsBhkAttachmentCollisionObject()
Definition: NiObject.h:63
virtual NiParticles * AsParticlesGeom()
Definition: NiObject.h:59
static constexpr auto Ni_RTTI
Definition: NiObject.h:40
virtual NiTriStrips * AsTriStrips()
Definition: NiObject.h:51
virtual NiTriShape * AsNiTriShape()
Definition: NiObject.h:58
virtual const NiRTTI * GetStreamableRTTI() const
Definition: NiObject.h:75
virtual bool StreamCanSkip()
Definition: NiObject.h:74
virtual NiObject * CreateClone([[maybe_unused]] NiCloningProcess &a_cloning)
Definition: NiObject.h:66
virtual const NiRTTI * GetRTTI() const
virtual bhkNiCollisionObject * AsBhkNiCollisionObject()
Definition: NiObject.h:61
virtual NiObjectGroup * GetGroup() const
Definition: NiObject.h:77
virtual void SaveBinary([[maybe_unused]] NiStream &a_stream)
Definition: NiObject.h:70
virtual NiSwitchNode * AsSwitchNode()
Definition: NiObject.h:47
virtual NiControllerManager * AsNiControllerManager()
Definition: NiObject.h:79
virtual NiGeometry * AsNiGeometry()
Definition: NiObject.h:56
virtual void LoadBinary([[maybe_unused]] NiStream &a_stream)
Definition: NiObject.h:67
virtual BSSegmentedTriShape * AsSegmentedTriShape()
Definition: NiObject.h:53
virtual NiTriBasedGeom * AsNiTriBasedGeom()
Definition: NiObject.h:57
virtual bool RegisterStreamables(NiStream &a_stream)
virtual void LinkObject([[maybe_unused]] NiStream &a_stream)
Definition: NiObject.h:68
virtual BSFadeNode * AsFadeNode()
Definition: NiObject.h:48
virtual void PostLinkObject([[maybe_unused]] NiStream &a_stream)
Definition: NiObject.h:73
virtual NiNode * AsNode()
Definition: NiObject.h:46
virtual void SetGroup([[maybe_unused]] NiObjectGroup *a_group)
Definition: NiObject.h:78
virtual BSTriShape * AsTriShape()
Definition: NiObject.h:52
Definition: NiSmartPointer.h:9
Definition: NiRTTI.h:6
Definition: NiRefObject.h:8
Definition: NiStream.h:6
Definition: bhkNiCollisionObject.h:11
Definition: bhkRigidBody.h:9
Definition: AbsorbEffect.h:6
NiSmartPointer(Actor)
constexpr REL::ID RTTI_NiObject
Definition: Offsets_RTTI.h:5393
constexpr REL::ID NiRTTI_NiObject
Definition: Offsets_NiRTTI.h:216