homog2d library
Public Member Functions | Public Attributes | List of all members
h2d::fct::DrawFunct< IMG > Struct Template Reference

A functor used to draw objects. To use with std::variant and std::visit() More...

#include <homog2d.hpp>

Collaboration diagram for h2d::fct::DrawFunct< IMG >:
Collaboration graph
[legend]

Public Member Functions

 DrawFunct (img::Image< IMG > &img, img::DrawParams dp=img::DrawParams())
 
template<typename T >
void operator() (const T &a)
 

Public Attributes

const img::DrawParams _drawParams
 
img::Image< IMG > & _img
 

Detailed Description

template<typename IMG>
struct h2d::fct::DrawFunct< IMG >

A functor used to draw objects. To use with std::variant and std::visit()

The constructor has a third optional parameter that can be used to pass drawing parameters

Constructor & Destructor Documentation

◆ DrawFunct()

template<typename IMG>
h2d::fct::DrawFunct< IMG >::DrawFunct ( img::Image< IMG > &  img,
img::DrawParams  dp = img::DrawParams() 
)
inline
1073  : _img(img), _drawParams(dp)
1074  {}
img::Image< IMG > & _img
Definition: homog2d.hpp:1076
const img::DrawParams _drawParams
Definition: homog2d.hpp:1077

Member Function Documentation

◆ operator()()

template<typename IMG>
template<typename T >
void h2d::fct::DrawFunct< IMG >::operator() ( const T &  a)
inline
1081  {
1082  a.draw( _img, _drawParams );
1083  }
img::Image< IMG > & _img
Definition: homog2d.hpp:1076
const img::DrawParams _drawParams
Definition: homog2d.hpp:1077

Member Data Documentation

◆ _drawParams

template<typename IMG>
const img::DrawParams h2d::fct::DrawFunct< IMG >::_drawParams

◆ _img

template<typename IMG>
img::Image<IMG>& h2d::fct::DrawFunct< IMG >::_img

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