Add TLine.
This commit is contained in:
parent
aa72adac71
commit
f30cd7879c
52
Engine/src/Runtime/Core/public/Math/Line.hpp
Normal file
52
Engine/src/Runtime/Core/public/Math/Line.hpp
Normal file
@ -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<RealType T>
|
||||
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<Real> 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<T>& normal, const TVector3<T>& p) {};
|
||||
|
||||
};
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user