30 #include "segment_funcs.h"
40 template<> Segment<3>& Segment<3>::rotatePoint(
const Quaternion& q,
48 template<> Segment<3>& Segment<3>::rotateCenter(
const Quaternion& q)
50 rotatePoint(q, getCenter());
54 template<> Segment<3> Segment<3>::toParentCoords(
const Point<3>& origin,
55 const Quaternion& rotation)
const
57 return Segment(m_p1.toParentCoords(origin, rotation),
58 m_p2.toParentCoords(origin, rotation));
61 template<> Segment<3> Segment<3>::toLocalCoords(
const Point<3>& origin,
62 const Quaternion& rotation)
const
64 return Segment(m_p1.toLocalCoords(origin, rotation),
65 m_p2.toLocalCoords(origin, rotation));
69 template class Segment<2>;
70 template class Segment<3>;
72 static_assert(std::is_standard_layout<Segment<2>>::value,
"Segment should be standard layout.");
73 static_assert(std::is_trivially_copyable<Segment<2>>::value,
"Segment should be trivially copyable.");
75 static_assert(std::is_standard_layout<Segment<3>>::value,
"Segment should be standard layout.");
76 static_assert(std::is_trivially_copyable<Segment<3>>::value,
"Segment should be trivially copyable.");