From a46380461a51b1fd86fbfd220e2986caef821c05 Mon Sep 17 00:00:00 2001 From: Scrabx3 Date: Wed, 31 Jul 2024 18:22:58 +0200 Subject: [PATCH 1/2] nimatrix: column vec funcs --- include/RE/N/NiMatrix3.h | 4 ++++ src/RE/N/NiMatrix3.cpp | 15 +++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/include/RE/N/NiMatrix3.h b/include/RE/N/NiMatrix3.h index 1b45a30bd..9a5447ad8 100644 --- a/include/RE/N/NiMatrix3.h +++ b/include/RE/N/NiMatrix3.h @@ -24,6 +24,10 @@ namespace RE NiMatrix3(float a_x, float a_y, float a_z); NiMatrix3(const NiPoint3& a_x, const NiPoint3& a_y, const NiPoint3& a_z); + NiPoint3 GetVectorX() const; + NiPoint3 GetVectorY() const; + NiPoint3 GetVectorZ() const; + bool ToEulerAnglesXYZ(NiPoint3& a_angle) const; bool ToEulerAnglesXYZ(float& a_xAngle, float& a_yAngle, float& a_zAngle) const; void EulerAnglesToAxesZXY(const NiPoint3& a_angle); diff --git a/src/RE/N/NiMatrix3.cpp b/src/RE/N/NiMatrix3.cpp index 260f2a963..8b9150bdb 100644 --- a/src/RE/N/NiMatrix3.cpp +++ b/src/RE/N/NiMatrix3.cpp @@ -28,6 +28,21 @@ namespace RE entry[2][2] = a_z.z; } + NiPoint3 NiMatrix3::GetVectorX() const + { + return NiPoint3{ entry[0][0], entry[1][0], entry[2][0] }; + } + + NiPoint3 NiMatrix3::GetVectorY() const + { + return NiPoint3{ entry[0][1], entry[1][1], entry[2][1] }; + } + + NiPoint3 NiMatrix3::GetVectorZ() const + { + return NiPoint3{ entry[0][2], entry[1][2], entry[2][2] }; + } + bool NiMatrix3::ToEulerAnglesXYZ(NiPoint3& a_angle) const { return ToEulerAnglesXYZ(a_angle.x, a_angle.y, a_angle.z); From fd07e463a8bc3d953a47c60b744ba81a1009040d Mon Sep 17 00:00:00 2001 From: Scrabx3 Date: Wed, 31 Jul 2024 18:26:06 +0200 Subject: [PATCH 2/2] missing vtables --- include/RE/A/ActorValueMeter.h | 1 + include/RE/A/ActorValueOwner.h | 1 + 2 files changed, 2 insertions(+) diff --git a/include/RE/A/ActorValueMeter.h b/include/RE/A/ActorValueMeter.h index e09cbfe07..67bc4a797 100644 --- a/include/RE/A/ActorValueMeter.h +++ b/include/RE/A/ActorValueMeter.h @@ -9,6 +9,7 @@ namespace RE { public: inline static constexpr auto RTTI = RTTI_ActorValueMeter; + inline static constexpr auto VTABLE = VTABLE_ActorValueMeter; ~ActorValueMeter() override; // 00 diff --git a/include/RE/A/ActorValueOwner.h b/include/RE/A/ActorValueOwner.h index c8dccc249..6ec1b14db 100644 --- a/include/RE/A/ActorValueOwner.h +++ b/include/RE/A/ActorValueOwner.h @@ -8,6 +8,7 @@ namespace RE { public: inline static constexpr auto RTTI = RTTI_ActorValueOwner; + inline static constexpr auto VTABLE = VTABLE_ActorValueOwner; virtual ~ActorValueOwner(); // 00