homog2d library
Public Member Functions | Friends | List of all members
h2d::detail::Intersect< Inters_1, FPT > Class Template Reference

One point intersection. More...

#include <homog2d.hpp>

Inheritance diagram for h2d::detail::Intersect< Inters_1, FPT >:
Inheritance graph
[legend]
Collaboration diagram for h2d::detail::Intersect< Inters_1, FPT >:
Collaboration graph
[legend]

Public Member Functions

Point2d_< FPT > get () const
 
 Intersect ()
 
 Intersect (const Point2d_< FPT > &ptInter)
 
template<typename FPT2 >
 Intersect (const Intersect< Inters_1, FPT2 > &other)
 To enable conversions from different floating-point types. More...
 
void set (const Point2d_< FPT > &pt)
 
size_t size () const
 
- Public Member Functions inherited from h2d::detail::IntersectCommon
bool operator() () const
 

Friends

template<typename T , typename U >
class h2d::base::SegVec
 

Additional Inherited Members

- Protected Attributes inherited from h2d::detail::IntersectCommon
bool _doesIntersect = false
 

Detailed Description

template<typename FPT>
class h2d::detail::Intersect< Inters_1, FPT >

One point intersection.

Constructor & Destructor Documentation

◆ Intersect() [1/3]

template<typename FPT >
h2d::detail::Intersect< Inters_1, FPT >::Intersect ( )
inline
2476 {}

◆ Intersect() [2/3]

template<typename FPT >
h2d::detail::Intersect< Inters_1, FPT >::Intersect ( const Point2d_< FPT > &  ptInter)
inline
2478  : _ptIntersect(ptInter)
2479  {
2480  _doesIntersect = true;
2481  }
bool _doesIntersect
Definition: homog2d.hpp:2442

◆ Intersect() [3/3]

template<typename FPT >
template<typename FPT2 >
h2d::detail::Intersect< Inters_1, FPT >::Intersect ( const Intersect< Inters_1, FPT2 > &  other)
inline

To enable conversions from different floating-point types.

2485  : IntersectCommon( other )
2486  {
2487  _ptIntersect = other._ptIntersect;
2488  }

Member Function Documentation

◆ get()

template<typename FPT >
Point2d_<FPT> h2d::detail::Intersect< Inters_1, FPT >::get ( ) const
inline
2464  {
2465  if( !_doesIntersect )
2466  HOMOG2D_THROW_ERROR_1( "No intersection points" );
2467  return _ptIntersect;
2468  }
bool _doesIntersect
Definition: homog2d.hpp:2442
#define HOMOG2D_THROW_ERROR_1(msg)
Error throw wrapper macro.
Definition: homog2d.hpp:181

◆ set()

template<typename FPT >
void h2d::detail::Intersect< Inters_1, FPT >::set ( const Point2d_< FPT > &  pt)
inline
2470  {
2471  _ptIntersect = pt;
2472  _doesIntersect = true;
2473  }
bool _doesIntersect
Definition: homog2d.hpp:2442
Point2d pt
Definition: homog2d_test.cpp:4034

◆ size()

template<typename FPT >
size_t h2d::detail::Intersect< Inters_1, FPT >::size ( ) const
inline
2474 { return _doesIntersect?1:0; }
bool _doesIntersect
Definition: homog2d.hpp:2442

Friends And Related Function Documentation

◆ h2d::base::SegVec

template<typename FPT >
template<typename T , typename U >
friend class h2d::base::SegVec
friend

The documentation for this class was generated from the following file: