Add Constructor with TVector3 and a Real w.
This commit is contained in:
parent
7814922931
commit
2f84387b1a
@ -8,6 +8,7 @@
|
||||
|
||||
|
||||
#include "Core/public/Math/Vector2.hpp"
|
||||
#include "Core/public/Math/Vector3.hpp"
|
||||
|
||||
#define PZeroVector4(type, aligned) Phanes::Core::Math::TVector4<##type, ##aligned>(0,0,0,0)
|
||||
|
||||
@ -86,6 +87,13 @@ namespace Phanes::Core::Math
|
||||
/// <param name="v2">TVector2 two</param>
|
||||
TVector4(const TVector2<Real, S>& v1, const TVector2<Real, S>& v2);
|
||||
|
||||
/// <summary>
|
||||
/// Construct vector from 3d vector (x,y,z) and w
|
||||
/// </summary>
|
||||
/// <param name="v1">TVector3</param>
|
||||
/// <param name="w">W</param>
|
||||
TVector4(const TVector3<Real, S>& v1, Real w);
|
||||
|
||||
/// <summary>
|
||||
/// Construct vector from array of components
|
||||
/// </summary>
|
||||
|
@ -35,6 +35,12 @@ namespace Phanes::Core::Math
|
||||
Detail::construct_vec4<T, S>::map(*this, comp);
|
||||
}
|
||||
|
||||
template<RealType T, bool S>
|
||||
Phanes::Core::Math::TVector4<T, S>::TVector4(const TVector3<T, S>& v, T w)
|
||||
{
|
||||
Detail::construct_vec4<T, S>::map(*this, v, w);
|
||||
}
|
||||
|
||||
|
||||
template<RealType T, bool S>
|
||||
TVector4<T, S>& operator+=(TVector4<T, S>& v1, const TVector4<T, S>& v2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user