|
Pottu
|
Defines 2D polygon for 2D gating. More...
#include <Gate2D.hpp>

Classes | |
| struct | point_t |
| Point type. More... | |
Public Member Functions | |
| void | update () |
| updates the other important fields after modifying points. More... | |
| bool | operator() (double x, double y) const noexcept |
| Tests if a given point is inside the gate. More... | |
Static Public Member Functions | |
| static Gate2D | createFromAsciiFile (const std::string &filename) |
| Reads the polygon from a file. More... | |
| static int | hasIntersection (point_t p0, point_t p1, point_t p2, point_t p3) noexcept |
Public Attributes | |
| std::vector< point_t > | points |
| point_t | pointOutside {0,0} |
| point_t | c00 {0} |
| point_t | c11 {0} |
Defines 2D polygon for 2D gating.
|
inlinestatic |
Reads the polygon from a file.
File must contain two columns, x and y, separated by whitespace. After the read this function calls update() automatically.
|
inlinenoexcept |
Tests if a given point is inside the gate.
| x | x coordinate of the point to be tested |
| y | y coordinate of the point to be tested |
|
inline |
updates the other important fields after modifying points.
Call this after setting vector points. This will throw runtime_error if points has less than four points (the last must be duplicate of the first).