13#include "../macros.hpp"
18hi_export_module(hikogui.geometry : line_segment);
20hi_export
namespace hi {
37 [[nodiscard]]
constexpr point3 origin()
const noexcept
42 [[nodiscard]]
constexpr vector3 direction()
const noexcept
47 [[nodiscard]]
friend float hypot(
line_segment const &rhs)
noexcept
52 template<std::
size_t I>
53 [[nodiscard]]
constexpr friend point3 get(
line_segment const &rhs)
noexcept
55 if constexpr (I == 0) {
57 }
else if constexpr (I == 1) {
58 return rhs._p + rhs._v;
60 hi_static_no_default();
64 [[nodiscard]]
constexpr friend point3 midpoint(
line_segment const &rhs)
noexcept
66 return rhs._p + rhs._v * 0.5f;
The HikoGUI namespace.
Definition array_generic.hpp:20
DOXYGEN BUG.
Definition algorithm_misc.hpp:20
Line segment.
Definition line_segment.hpp:26
A high-level geometric vector Part of the high-level vector, point, mat and color types.
Definition vector3.hpp:26