File indexing completed on 2025-01-18 09:15:56
0001
0002
0003
0004 #pragma once
0005 #include "Math/Point2D.h"
0006 #include <vector>
0007
0008
0009 namespace epic::geo {
0010
0011 using Point = ROOT::Math::XYPoint;
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 std::vector<Point> fillRectangles(Point ref, double sx, double sy, double rmin, double rmax,
0024 double phmin = -M_PI, double phmax = M_PI);
0025
0026 inline std::vector<Point> fillSquares(Point ref, double size, double rmin, double rmax,
0027 double phmin = -M_PI, double phmax = M_PI) {
0028 return fillRectangles(ref, size, size, rmin, rmax, phmin, phmax);
0029 }
0030
0031 std::vector<Point> fillHexagons(Point ref, double lside, double rmin, double rmax,
0032 double phmin = -M_PI, double phmax = M_PI);
0033
0034 bool isPointInsidePolygon(Point p, std::vector<Point> vertices);
0035
0036 bool isBoxTotalInsidePolygon(Point box[4], std::vector<Point> vertices);
0037
0038 bool isBoxPartialInsidePolygon(Point box[4], std::vector<Point> vertices);
0039
0040 std::vector<std::pair<double, double>>
0041 getPolygonVertices(std::pair<double, double> center, double radius, double angle_0, int numSides);
0042
0043 }