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
2510 {}

◆ Intersect() [2/3]

template<typename FPT >
h2d::detail::Intersect< Inters_1, FPT >::Intersect ( const Point2d_< FPT > &  ptInter)
inline
2512  : _ptIntersect(ptInter)
2513  {
2514  _doesIntersect = true;
2515  }
bool _doesIntersect
Definition: homog2d.hpp:2476

◆ 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.

2519  : IntersectCommon( other )
2520  {
2521  _ptIntersect = other._ptIntersect;
2522  }

Member Function Documentation

◆ get()

template<typename FPT >
Point2d_<FPT> h2d::detail::Intersect< Inters_1, FPT >::get ( ) const
inline
2498  {
2499  if( !_doesIntersect )
2500  HOMOG2D_THROW_ERROR_1( "No intersection points" );
2501  return _ptIntersect;
2502  }
bool _doesIntersect
Definition: homog2d.hpp:2476
#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
2504  {
2505  _ptIntersect = pt;
2506  _doesIntersect = true;
2507  }
bool _doesIntersect
Definition: homog2d.hpp:2476
Point2d pt
Definition: homog2d_test.cpp:4034

◆ size()

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

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: