opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
line_segment.h
Go to the documentation of this file.
1#pragma once
2
5
6#include <cstddef>
7#include <functional>
8#include <iosfwd>
9
10namespace osc
11{
12 // a finite-length line delimited by two endpoints in 3D space
14
15 constexpr friend bool operator==(const LineSegment&, const LineSegment&) = default;
16
19 };
20
21 std::ostream& operator<<(std::ostream&, const LineSegment&);
22}
23
24template<>
25struct std::hash<osc::LineSegment> {
26 size_t operator()(const osc::LineSegment& line_segment) const noexcept
27 {
28 return osc::hash_of(line_segment.start, line_segment.end);
29 }
30};
Definition custom_decoration_generator.h:5
std::ostream & operator<<(std::ostream &, const Object &)
size_t hash_of(const T &v) noexcept(noexcept(std::hash< T >{}(v)))
Definition hash_helpers.h:24
constexpr U to(T &&value)
Definition conversion.h:56
Definition line_segment.h:13
Vector3 start
Definition line_segment.h:17
Vector3 end
Definition line_segment.h:18
constexpr friend bool operator==(const LineSegment &, const LineSegment &)=default
size_t operator()(const osc::LineSegment &line_segment) const noexcept
Definition line_segment.h:26