zeus/include/CLine.hpp

32 lines
476 B
C++
Raw Normal View History

2015-10-25 19:31:41 +00:00
#ifndef CLINE_HPP
#define CLINE_HPP
#include "Global.hpp"
#include "CVector3f.hpp"
#include "CUnitVector.hpp"
namespace Zeus
{
class alignas(16) CLine
{
public:
CLine(const CVector3f& a, const CUnitVector3f& b)
{
CVector3f ab = (b - a).normalized();
start = a;
if (ab.x != 0.0f || ab.y != 0.0f || ab.z != 0.0f)
normal = ab;
2015-11-02 18:44:46 +00:00
2015-10-25 19:31:41 +00:00
end = b;
}
CVector3f start;
CVector3f normal;
CUnitVector3f end;
};
}
#endif