homog2d library
Public Member Functions | List of all members
h2d::detail::RectArea< FPT > Class Template Reference

Helper class, holds result of intersections of two FRect_. More...

#include <homog2d.hpp>

Public Member Functions

FRect_< FPT > get () const
 
bool operator() () const
 
 RectArea ()=default
 
 RectArea (const FRect_< FPT > &r)
 

Detailed Description

template<typename FPT>
class h2d::detail::RectArea< FPT >

Helper class, holds result of intersections of two FRect_.

See also
FRect_::intersectArea() FPT: Floating Point Type, is defined by the rectangle on which member function intersectArea() is called.

Constructor & Destructor Documentation

◆ RectArea() [1/2]

template<typename FPT>
h2d::detail::RectArea< FPT >::RectArea ( )
default

◆ RectArea() [2/2]

template<typename FPT>
h2d::detail::RectArea< FPT >::RectArea ( const FRect_< FPT > &  r)
inline
2604  : _success(true), _area(r)
2605  {}

Member Function Documentation

◆ get()

template<typename FPT>
FRect_<FPT> h2d::detail::RectArea< FPT >::get ( ) const
inline
2612  {
2613  if( !_success )
2614  HOMOG2D_THROW_ERROR_1( "unable, no intersection between the two rectangles" );
2615  return _area;
2616  }
#define HOMOG2D_THROW_ERROR_1(msg)
Error throw wrapper macro.
Definition: homog2d.hpp:181
Here is the caller graph for this function:

◆ operator()()

template<typename FPT>
bool h2d::detail::RectArea< FPT >::operator() ( ) const
inline
2607  {
2608  return _success;
2609  }

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