mirror of https://github.com/AxioDL/zeus.git
Add forgotten CMRay
This commit is contained in:
parent
40ca0c3219
commit
35a6a511d8
|
@ -0,0 +1,47 @@
|
|||
#ifndef CMRAY_HPP
|
||||
#define CMRAY_HPP
|
||||
#include "CVector3f.hpp"
|
||||
#include "CTransform.hpp"
|
||||
#include "Math.hpp"
|
||||
|
||||
namespace Zeus
|
||||
{
|
||||
struct alignas(16) CMRay
|
||||
{
|
||||
CMRay(const CVector3f& start, const CVector3f& end, float dir)
|
||||
: start(start),
|
||||
dir(dir),
|
||||
unk3(1.0 / dir),
|
||||
unk4(end)
|
||||
{
|
||||
unk1 = start + (dir * end);
|
||||
unk2 = (unk1 - start);
|
||||
}
|
||||
|
||||
CMRay(const CVector3f &start, const CVector3f &end, float dir, float unk)
|
||||
: start(start),
|
||||
dir(dir),
|
||||
unk3(unk),
|
||||
unk4(end)
|
||||
{
|
||||
unk1 = start + (dir * end);
|
||||
unk2 = (unk1 - start);
|
||||
}
|
||||
|
||||
CMRay GetInvUnscaledTransformRay(const CTransform& xfrm)
|
||||
{
|
||||
CTransform inv = xfrm.inverse();
|
||||
|
||||
return CMRay(newStart, newEnd, dir, unk3);
|
||||
}
|
||||
|
||||
CVector3f start;
|
||||
CVector3f unk1;
|
||||
CVector3f unk2;
|
||||
float dir;
|
||||
float unk3;
|
||||
CVector3f unk4;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue