homog2d library
Public Member Functions | Public Attributes | Friends | List of all members
h2d::priv::runion::Index< T > Struct Template Reference

Holds x or y coordinate value of rectangle during computation of intersection area. More...

#include <homog2d.hpp>

Collaboration diagram for h2d::priv::runion::Index< T >:
Collaboration graph
[legend]

Public Member Functions

 Index ()=default
 
 Index (T v, uint8_t r)
 

Public Attributes

uint8_t _rect_idx =0
 
_value
 

Friends

bool operator< (const Index &i1, const Index &i2)
 
std::ostream & operator<< (std::ostream &f, const Index &idx)
 

Detailed Description

template<typename T>
struct h2d::priv::runion::Index< T >

Holds x or y coordinate value of rectangle during computation of intersection area.

Constructor & Destructor Documentation

◆ Index() [1/2]

template<typename T>
h2d::priv::runion::Index< T >::Index ( )
default

◆ Index() [2/2]

template<typename T>
h2d::priv::runion::Index< T >::Index ( v,
uint8_t  r 
)
inline
7834  : _value(v), _rect_idx(r)
7835  {}
T _value
Definition: homog2d.hpp:7829
uint8_t _rect_idx
Definition: homog2d.hpp:7830

Friends And Related Function Documentation

◆ operator<

template<typename T>
bool operator< ( const Index< T > &  i1,
const Index< T > &  i2 
)
friend
7837  {
7838 
7839  if( i1._value == i2._value )
7840  return i1._rect_idx < i2._rect_idx;
7841  return i1._value < i2._value;
7842  }

◆ operator<<

template<typename T>
std::ostream& operator<< ( std::ostream &  f,
const Index< T > &  idx 
)
friend
7844  {
7845  f << idx._value << " ";
7846  return f;
7847  }

Member Data Documentation

◆ _rect_idx

template<typename T>
uint8_t h2d::priv::runion::Index< T >::_rect_idx =0

◆ _value

template<typename T>
T h2d::priv::runion::Index< T >::_value

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