Skip to content

Commit

Permalink
Merge pull request #115 from Scrabx3/dev
Browse files Browse the repository at this point in the history
NiMatrix QoL funcs & missing VTables
  • Loading branch information
powerof3 authored Jul 31, 2024
2 parents 307c390 + fd07e46 commit d9be5b1
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/RE/A/ActorValueMeter.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace RE
{
public:
inline static constexpr auto RTTI = RTTI_ActorValueMeter;
inline static constexpr auto VTABLE = VTABLE_ActorValueMeter;

~ActorValueMeter() override; // 00

Expand Down
1 change: 1 addition & 0 deletions include/RE/A/ActorValueOwner.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace RE
{
public:
inline static constexpr auto RTTI = RTTI_ActorValueOwner;
inline static constexpr auto VTABLE = VTABLE_ActorValueOwner;

virtual ~ActorValueOwner(); // 00

Expand Down
4 changes: 4 additions & 0 deletions include/RE/N/NiMatrix3.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
15 changes: 15 additions & 0 deletions src/RE/N/NiMatrix3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d9be5b1

Please sign in to comment.