30#include "segment_funcs.h"
40template<> Segment<3>& Segment<3>::rotatePoint(
const Quaternion& q,
48template<> Segment<3>& Segment<3>::rotateCenter(
const Quaternion& q)
50 rotatePoint(q, getCenter());
54template<> 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));
61template<> 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));
69template class Segment<2>;
70template class Segment<3>;
72static_assert(std::is_standard_layout<Segment<2>>::value,
"Segment should be standard layout.");
73static_assert(std::is_trivially_copyable<Segment<2>>::value,
"Segment should be trivially copyable.");
75static_assert(std::is_standard_layout<Segment<3>>::value,
"Segment should be standard layout.");
76static_assert(std::is_trivially_copyable<Segment<3>>::value,
"Segment should be trivially copyable.");
Generic library namespace.