zeus/include/zeus/CLineSeg.hpp

21 lines
447 B
C++
Raw Permalink Normal View History

2018-10-06 20:39:40 -07:00
#pragma once
2016-04-26 03:36:44 -07:00
#include "zeus/CVector3f.hpp"
2018-12-07 17:16:50 -08:00
namespace zeus {
class CLineSeg {
2016-04-26 03:36:44 -07:00
public:
2018-12-07 17:16:50 -08:00
CLineSeg(const CVector3f& start, const CVector3f& end) : x0_start(start), x18_end(end) {
CVector3f tmp = (end - start).normalized();
if (tmp.x() != 0.f || tmp.y() != 0.f || tmp.z() != 0.f)
xc_dir = tmp.normalized();
else
2019-02-23 23:15:32 -08:00
xc_dir = CVector3f();
2018-12-07 17:16:50 -08:00
}
2016-04-26 03:36:44 -07:00
2018-12-07 17:16:50 -08:00
CVector3f x0_start;
CVector3f xc_dir;
CVector3f x18_end;
2016-04-26 03:36:44 -07:00
};
2018-12-07 21:23:50 -08:00
} // namespace zeus