Garfield 0.3
Toolkit for the detailed simulation of particle detectors based on ionization measurement in gases and semiconductors
Loading...
Searching...
No Matches
Polygon.hh File Reference
#include <vector>

Go to the source code of this file.

Namespaces

namespace  Garfield
namespace  Garfield::Polygon

Functions

void Garfield::Polygon::Inside (const std::vector< double > &xpl, const std::vector< double > &ypl, const double x, const double y, bool &inside, bool &edge)
 Determine whether the point (x, y) is located inside of the polygon (xpl, ypl).
double Garfield::Polygon::Area (const std::vector< double > &xp, const std::vector< double > &yp)
 Determine the (signed) area of a polygon.
bool Garfield::Polygon::NonTrivial (const std::vector< double > &xp, const std::vector< double > &yp)
 Check whether a set of points builds a non-trivial polygon.
void Garfield::Polygon::EliminateButterflies (std::vector< double > &xp, std::vector< double > &yp, std::vector< double > &zp)
 Try to eliminate "butterflies" (crossing of two adjacent segments of a polygon), by point exchanges.