Project
Loading...
Searching...
No Matches
o2::mch::contour::Polygon< T > Class Template Reference

#include <Polygon.h>

Public Types

using size_type = typename std::vector< o2::mch::contour::Vertex< T > >::size_type
 

Public Member Functions

 Polygon ()=default
 
template<typename InputIterator >
 Polygon (InputIterator first, InputIterator last)
 
 Polygon (std::initializer_list< o2::mch::contour::Vertex< T > > args)
 
o2::mch::contour::Vertex< T > firstVertex () const
 
size_type size () const
 
bool empty () const
 
o2::mch::contour::Vertex< T > operator[] (int i) const
 
bool isCounterClockwiseOriented () const
 
bool isManhattan () const
 
bool isClosed () const
 
bool contains (T x, T y) const
 
double signedArea () const
 
void scale (T sx, T sy)
 
void translate (T dx, T dy)
 

Friends

std::ostream & operator<< (std::ostream &os, const Polygon< T > &polygon)
 

Detailed Description

template<typename T>
class o2::mch::contour::Polygon< T >

Definition at line 44 of file Polygon.h.

Member Typedef Documentation

◆ size_type

template<typename T >
using o2::mch::contour::Polygon< T >::size_type = typename std::vector<o2::mch::contour::Vertex<T> >::size_type

Definition at line 47 of file Polygon.h.

Constructor & Destructor Documentation

◆ Polygon() [1/3]

template<typename T >
o2::mch::contour::Polygon< T >::Polygon ( )
default

◆ Polygon() [2/3]

template<typename T >
template<typename InputIterator >
o2::mch::contour::Polygon< T >::Polygon ( InputIterator  first,
InputIterator  last 
)
inline

Definition at line 52 of file Polygon.h.

◆ Polygon() [3/3]

template<typename T >
o2::mch::contour::Polygon< T >::Polygon ( std::initializer_list< o2::mch::contour::Vertex< T > >  args)
inline

Definition at line 57 of file Polygon.h.

Member Function Documentation

◆ contains()

template<typename T >
bool o2::mch::contour::Polygon< T >::contains ( x,
y 
) const

Definition at line 173 of file Polygon.h.

◆ empty()

template<typename T >
bool o2::mch::contour::Polygon< T >::empty ( ) const
inline

Definition at line 63 of file Polygon.h.

◆ firstVertex()

template<typename T >
o2::mch::contour::Vertex< T > o2::mch::contour::Polygon< T >::firstVertex ( ) const
inline

Definition at line 59 of file Polygon.h.

◆ isClosed()

template<typename T >
bool o2::mch::contour::Polygon< T >::isClosed ( ) const
inline

Definition at line 79 of file Polygon.h.

◆ isCounterClockwiseOriented()

template<typename T >
bool o2::mch::contour::Polygon< T >::isCounterClockwiseOriented ( ) const
inline

Definition at line 67 of file Polygon.h.

◆ isManhattan()

template<typename T >
bool o2::mch::contour::Polygon< T >::isManhattan ( ) const
inline

Definition at line 69 of file Polygon.h.

◆ operator[]()

template<typename T >
o2::mch::contour::Vertex< T > o2::mch::contour::Polygon< T >::operator[] ( int  i) const
inline

Definition at line 65 of file Polygon.h.

◆ scale()

template<typename T >
void o2::mch::contour::Polygon< T >::scale ( sx,
sy 
)
inline

Definition at line 97 of file Polygon.h.

◆ signedArea()

template<typename T >
double o2::mch::contour::Polygon< T >::signedArea ( ) const
inline

Compute the signed area of this polygon Algorithm from F. Feito, J.C. Torres and A. Urena, Comput. & Graphics, Vol. 19, pp. 595-600, 1995

Definition at line 83 of file Polygon.h.

◆ size()

template<typename T >
size_type o2::mch::contour::Polygon< T >::size ( ) const
inline

Definition at line 61 of file Polygon.h.

◆ translate()

template<typename T >
void o2::mch::contour::Polygon< T >::translate ( dx,
dy 
)
inline

Definition at line 105 of file Polygon.h.

Friends And Related Symbol Documentation

◆ operator<<

template<typename T >
std::ostream & operator<< ( std::ostream &  os,
const Polygon< T > &  polygon 
)
friend

Definition at line 113 of file Polygon.h.


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