CommonLibSSE NG
Loading...
Searching...
No Matches
NiPoint3.h
Go to the documentation of this file.
1#pragma once
2
3namespace RE
4{
5 class NiPoint3
6 {
7 public:
8 constexpr NiPoint3() noexcept = default;
9
10 constexpr NiPoint3(float a_x, float a_y, float a_z) noexcept :
11 x(a_x),
12 y(a_y),
13 z(a_z){};
14
15 float& operator[](std::size_t a_idx);
16 const float& operator[](std::size_t a_idx) const;
17 bool operator==(const NiPoint3& a_rhs) const;
18 bool operator!=(const NiPoint3& a_rhs) const;
19 NiPoint3 operator+(const NiPoint3& a_rhs) const;
20 NiPoint3 operator-(const NiPoint3& a_rhs) const;
21 float operator*(const NiPoint3& a_rhs) const;
22 NiPoint3 operator*(float a_scalar) const;
23 NiPoint3 operator/(float a_scalar) const;
29 NiPoint3& operator*=(float a_scalar);
30 NiPoint3& operator/=(float a_scalar);
31
32 [[nodiscard]] NiPoint3 Cross(const NiPoint3& pt) const;
33 [[nodiscard]] float Dot(const NiPoint3& pt) const;
34 [[nodiscard]] float GetDistance(const NiPoint3& a_pt) const noexcept;
35 [[nodiscard]] float GetSquaredDistance(const NiPoint3& a_pt) const noexcept;
36 [[nodiscard]] float Length() const;
37 [[nodiscard]] float SqrLength() const;
38 [[nodiscard]] NiPoint3 UnitCross(const NiPoint3& a_pt) const;
39 float Unitize();
40
41 static const NiPoint3& Zero();
42
43 // members
44 float x{ 0.0F }; // 0
45 float y{ 0.0F }; // 4
46 float z{ 0.0F }; // 8
47 };
48 static_assert(sizeof(NiPoint3) == 0xC);
49}
Definition NiPoint3.h:6
NiPoint3 operator*(float a_scalar) const
NiPoint3 Cross(const NiPoint3 &pt) const
float GetDistance(const NiPoint3 &a_pt) const noexcept
NiPoint3 operator-() const
NiPoint3 & operator/=(const NiPoint3 &a_rhs)
float operator*(const NiPoint3 &a_rhs) const
static const NiPoint3 & Zero()
NiPoint3 & operator*=(float a_scalar)
float Dot(const NiPoint3 &pt) const
NiPoint3 operator-(const NiPoint3 &a_rhs) const
bool operator!=(const NiPoint3 &a_rhs) const
float z
Definition NiPoint3.h:46
bool operator==(const NiPoint3 &a_rhs) const
NiPoint3 operator/(float a_scalar) const
NiPoint3 & operator-=(const NiPoint3 &a_rhs)
NiPoint3 operator+(const NiPoint3 &a_rhs) const
const float & operator[](std::size_t a_idx) const
NiPoint3 & operator/=(float a_scalar)
float Unitize()
NiPoint3 UnitCross(const NiPoint3 &a_pt) const
constexpr NiPoint3() noexcept=default
float x
Definition NiPoint3.h:44
float & operator[](std::size_t a_idx)
float GetSquaredDistance(const NiPoint3 &a_pt) const noexcept
NiPoint3 & operator+=(const NiPoint3 &a_rhs)
NiPoint3 & operator*=(const NiPoint3 &a_rhs)
float Length() const
float y
Definition NiPoint3.h:45
float SqrLength() const
Definition AbsorbEffect.h:6