From f30cd7879cc45ee7d1fbc3d652d6b91969dbd3cd Mon Sep 17 00:00:00 2001 From: scorpioblood <77296181+scorpioblood@users.noreply.github.com> Date: Tue, 21 May 2024 22:43:48 +0200 Subject: [PATCH] Add TLine. --- Engine/src/Runtime/Core/public/Math/Line.hpp | 52 ++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Engine/src/Runtime/Core/public/Math/Line.hpp diff --git a/Engine/src/Runtime/Core/public/Math/Line.hpp b/Engine/src/Runtime/Core/public/Math/Line.hpp new file mode 100644 index 0000000..6d138da --- /dev/null +++ b/Engine/src/Runtime/Core/public/Math/Line.hpp @@ -0,0 +1,52 @@ +#pragma once + + +#include "Core/public/Math/Boilerplate.h" +#include "Core/public/Math/MathFwd.h" + +#include "Core/public/Math/Vector3.hpp" + + +namespace Phanes::Core::Math +{ + + // Line with direction and moment + + template + struct TLine + { + public: + using Real = T; + union + { + struct + { + /** X component of line */ + Real x; + + /** Y component of line */ + Real y; + + /** Z component of line */ + Real z; + }; + TVector3 normal; + }; + + /** Moment of line */ + + Real m; + + public: + + /** Construct line from base and normal + * + * @param(normal) Normal of line + * @param(p) Base of line + */ + + TLine(const TVector3& normal, const TVector3& p) {}; + + }; + +} \ No newline at end of file