6namespace fishnet::geometry::__impl{
10 using numeric_type = T;
12 PointStub<T> origin()
const{
13 return PointStub<T>(0,0);
15 PointStub<T> direction()
const{
16 return PointStub<T>(1,1);
18 RayStub(PointStub<T> origin, PointStub<T> direction){}
19 bool operator==(
const RayStub & other)
const noexcept{
22 RayStub<T> oppositeRay()
const{
23 return RayStub(origin(), -direction());
25 RayStub<T> operator-()
const{
28 bool isParallel(LineStub<T> line)
const{
31 bool isParallel(RayStub<T> ray)
const{
34 bool intersects(LineStub<T> line)
const{
37 bool intersects(RayStub<T> ray)
const{
40 bool contains(PointStub<T> point)
const{
49 LineStub<T> toLine()
const{
50 return LineStub(origin(), origin()+direction());
52 size_t hash() const noexcept {
55 std::string toString()
const{
70 const std::remove_cvref_t<R> & ray,
71 const __impl::RayStub<typename std::remove_cvref_t<R>::numeric_type> & otherRay,
72 const __impl::PointStub<typename std::remove_cvref_t<R>::numeric_type> & point,
73 const __impl::LineStub<typename std::remove_cvref_t<R>::numeric_type> & line
76 {ray.direction()} ->
IPoint;
77 {ray.oppositeRay()} -> std::same_as<std::remove_cvref_t<R>>;
78 {-ray} -> std::same_as<std::remove_cvref_t<R>>;
79 {ray.isParallel(line)} -> std::same_as<bool>;
80 {ray.isParallel(otherRay)} -> std::same_as<bool>;
81 {ray.intersects(line)} -> std::same_as<bool>;
82 {ray.intersects(otherRay)} -> std::same_as<bool>;
83 {ray.contains(point)} -> std::same_as<bool>;
86 {ray.toLine()} ->
ILine;
IPolygon implementation backed by an OGRPolygon.
Definition OGRPolygonAdapter.hpp:22
Definition GeometryBase.hpp:11
Interface for a line A line is defined through two points p and q, defining a direction vector.
Definition ILine.hpp:76
Definition IPoint.hpp:135
Interface for a point.
Definition IPoint.hpp:92
Interface for a ray A ray is defined through its origin and a direction.
Definition IRay.hpp:69
Definition BoundingBoxWrapper.hpp:5