polygon::PolygonIntersection Class Reference

Data Structures

Public Member Functions

Protected Types

Protected Member Functions

Protected Attributes


Detailed Description

Compute the area of intersection of two polygons. The polygons are given as a vector of vertices of struct point.


Member Typedef Documentation

typedef long long polygon::PolygonIntersection::hp [protected]

Constructor & Destructor Documentation

polygon::PolygonIntersection::PolygonIntersection ( void   )  [inline]
virtual polygon::PolygonIntersection::~PolygonIntersection (  )  [inline, virtual]

Member Function Documentation

float polygon::PolygonIntersection::inter ( std::vector< point > &  a,
std::vector< point > &  b 
) [inline]

return the area of intersection between two plygons defined by the verices in a[] and b[].

Referenced by Extractor::extract_aperture_w_rebin(), and Projector::find_res_elems_ell_aperture().

float polygon::PolygonIntersection::inter ( point a,
int  na,
point b,
int  nb 
)

return the area of intersection between two plygons defined by the verices in a[] and b[].

References area(), B_, cross(), fit(), inness(), polygon::PolygonIntersection::box::max, polygon::PolygonIntersection::box::min, ovl(), range(), polygon::point::x, and polygon::point::y.

std::vector< point > polygon::PolygonIntersection::get_ellipse ( const float  x,
const float  y,
const float  a,
const float  b,
const float  pa,
const int  n 
) const

return a vector<point> with n vertices on an ellipse of semi-axes a and b and position angle pa centered at x, y.

References c, and v.

Referenced by Projector::find_res_elems_ell_aperture().

std::vector< point > polygon::PolygonIntersection::get_rect ( const float  x,
const float  y,
const float  xw,
const float  yw 
) const

return a vector<point> with 4 vertices on a rectangle which is xw pixel wide and yw pixel high x, y.

References v.

void polygon::PolygonIntersection::bd ( float *  X,
float  y 
) [inline, protected]

Referenced by range().

void polygon::PolygonIntersection::bu ( float *  X,
float  y 
) [inline, protected]

Referenced by range().

void polygon::PolygonIntersection::range ( point x,
int  c 
) [protected]
void polygon::PolygonIntersection::fit ( point x,
int  cx,
vertex ix,
int  fudge,
float  sclx,
float  scly,
float  mid 
) [protected]
hp polygon::PolygonIntersection::area ( const ipoint a,
const ipoint p,
const ipoint q 
) [inline, protected]
void polygon::PolygonIntersection::cntrib ( const ipoint f,
const ipoint t,
short  w,
hp s 
) [inline, protected]
int polygon::PolygonIntersection::ovl ( rng  p,
rng  q 
) [inline, protected]
void polygon::PolygonIntersection::cross ( vertex a,
vertex b,
vertex c,
vertex d,
double  a1,
double  a2,
double  a3,
double  a4,
hp s 
) [protected]
void polygon::PolygonIntersection::inness ( vertex P,
int  cP,
vertex Q,
int  cQ,
hp s 
) [protected]

Field Documentation

Referenced by fit(), inter(), and range().


Generated on 4 Nov 2015 for CURE by  doxygen 1.6.1