Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Definition at line 1418 of file PolygonTriangulator.cxx.
◆ Polygon()
PolygonTriangulator::Polygon::Polygon |
( |
const std::vector< double > & |
x, |
|
|
const std::vector< double > & |
y |
|
) |
| |
◆ ~Polygon()
PolygonTriangulator::Polygon::~Polygon |
( |
| ) |
|
◆ addDiagonal()
void PolygonTriangulator::Polygon::addDiagonal |
( |
const unsigned int & |
i, |
|
|
const unsigned int & |
j |
|
) |
| |
|
private |
◆ angleCosb()
double PolygonTriangulator::Polygon::angleCosb |
( |
double * |
A, |
|
|
double * |
B, |
|
|
double * |
C |
|
) |
| |
|
private |
Definition at line 1847 of file PolygonTriangulator.cxx.
1849 double dxab = pa[0] -
pb[0];
1850 double dyab = pa[1] -
pb[1];
1852 double dxcb =
pc[0] -
pb[0];
1853 double dycb =
pc[1] -
pb[1];
1855 double dxab2 = dxab * dxab;
1856 double dyab2 = dyab * dyab;
1857 double dxcb2 = dxcb * dxcb;
1858 double dycb2 = dycb * dycb;
1859 double ab = dxab2 + dyab2;
1860 double cb = dxcb2 + dycb2;
1862 double cosb = dxab * dxcb + dyab * dycb;
1863 double denom = sqrt( ab * cb);
◆ edges()
◆ handleEndVertex()
void PolygonTriangulator::Polygon::handleEndVertex |
( |
const unsigned int & |
i | ) |
|
|
private |
◆ handleMergeVertex()
void PolygonTriangulator::Polygon::handleMergeVertex |
( |
const unsigned int & |
i | ) |
|
|
private |
◆ handleRegularVertexDown()
void PolygonTriangulator::Polygon::handleRegularVertexDown |
( |
const unsigned int & |
i | ) |
|
|
private |
◆ handleRegularVertexUp()
void PolygonTriangulator::Polygon::handleRegularVertexUp |
( |
const unsigned int & |
i | ) |
|
|
private |
◆ handleSplitVertex()
void PolygonTriangulator::Polygon::handleSplitVertex |
( |
const unsigned int & |
i | ) |
|
|
private |
◆ handleStartVertex()
void PolygonTriangulator::Polygon::handleStartVertex |
( |
const unsigned int & |
i | ) |
|
|
private |
◆ init_vertices_and_lines()
void PolygonTriangulator::Polygon::init_vertices_and_lines |
( |
| ) |
|
|
private |
◆ initializate()
void PolygonTriangulator::Polygon::initializate |
( |
| ) |
|
|
private |
◆ next()
unsigned int PolygonTriangulator::Polygon::next |
( |
const unsigned int & |
i | ) |
|
|
private |
Definition at line 1608 of file PolygonTriangulator.cxx.
1610 unsigned int j(0),prevLoop(0),currentLoop(0);
1614 prevLoop=currentLoop;
1621 if( currentLoop==0) j=1;
◆ partition2Monotone()
void PolygonTriangulator::Polygon::partition2Monotone |
( |
| ) |
|
Definition at line 1809 of file PolygonTriangulator.cxx.
1814 std::cout<<
"Please check your input polygon:\n1)orientations?\n2)duplicated points?\n";
1822 unsigned int id=
vertex.id;
1833 std::cout<<
"No duplicated points please!\n";
◆ points()
◆ prev()
unsigned int PolygonTriangulator::Polygon::prev |
( |
const unsigned int & |
i | ) |
|
|
private |
◆ searchMonotones()
void PolygonTriangulator::Polygon::searchMonotones |
( |
| ) |
|
Definition at line 1916 of file PolygonTriangulator.cxx.
1928 poly.push_back(startp->
id);
1932 endp=
next->endPoint(1);
1938 if(endp==startp)
break;
1939 poly.push_back(endp->
id);
1945 std::cout<<
"Please check your input polygon:\n";
1946 std::cout<<
"1)orientations?\n2)with duplicated points?\n3)is a simple one?\n";
1951 if(
next->endPoint(0) !=endp )
next->reverse();
◆ selectNextEdge()
Definition at line 1874 of file PolygonTriangulator.cxx.
1879 assert(!
edges.empty());
1881 unsigned int nexte=0;
1882 if(
edges.size() == 1 ) nexte=*(
edges.begin());
1883 else if(
edges.size() > 1 )
1885 unsigned int nexte_ccw(0), nexte_cw(0);
1892 if(*
it==edge->
id())
continue;
1893 double A[2],
B[2],
C[2];
1903 if(
area > 0 &&
max < cosb ) { nexte_ccw=*
it;
max=cosb; }
1904 else if(
min > cosb ) { nexte_cw=*
it;
min=cosb; }
1907 nexte = (nexte_ccw!=0) ? nexte_ccw : nexte_cw;
◆ set_contour()
void PolygonTriangulator::Polygon::set_contour |
( |
const std::vector< double > & |
x, |
|
|
const std::vector< double > & |
y |
|
) |
| |
|
private |
◆ triangles()
◆ triangulateMonotone()
Definition at line 1962 of file PolygonTriangulator.cxx.
1966 for(; itnext=
it,
it!=mpoly.end(); ++
it)
1969 if(itnext==mpoly.end()) itnext=mpoly.begin();
1971 point.
left=(point > pointnext)?
true:
false;
1972 qvertex.push(point);
1975 std::stack<internal_poltrig::Pointbase> spoint;
1976 for(
int i=0;
i<2; ++
i) { spoint.push(qvertex.top()); qvertex.pop(); }
1978 while ( qvertex.size() > 1 )
1983 if(topQueuePoint.
left!=topStackPoint.
left)
1985 while ( spoint.size() > 1 )
1991 v[0]=topQueuePoint.
id;
1999 spoint.push(topStackPoint);
2000 spoint.push(topQueuePoint);
2004 while( spoint.size() > 1 )
2009 spoint.push(stack1Point);
2010 double pa[2],
pb[2],
pc[2];
2011 pa[0]=topQueuePoint.
x; pa[1]=topQueuePoint.
y;
2012 pb[0]=stack2Point.
x;
pb[1]=stack2Point.
y;
2013 pc[0]=stack1Point.
x;
pc[1]=stack1Point.
y;
2016 bool left=stack1Point.
left;
2017 if( (
area > 0 && left) || (
area < 0 && !left ) )
2020 v[0]=topQueuePoint.
id;
2021 v[1]=stack2Point.
id;
2022 v[2]=stack1Point.
id;
2029 spoint.push(topQueuePoint);
2038 while( spoint.size() !=1 )
2045 v[0]=lastQueuePoint.
id;
◆ triangulation()
void PolygonTriangulator::Polygon::triangulation |
( |
| ) |
|
◆ m_diagonals
◆ m_edgebst
◆ m_edges
◆ m_l_id
long int PolygonTriangulator::Polygon::m_l_id |
|
private |
◆ m_mpolys
◆ m_ncontours
unsigned int PolygonTriangulator::Polygon::m_ncontours |
|
private |
◆ m_nVertices
std::vector<unsigned int> PolygonTriangulator::Polygon::m_nVertices |
|
private |
◆ m_points
◆ m_qpoints
◆ m_startAdjEdgeMap
◆ m_triangles
Triangles PolygonTriangulator::Polygon::m_triangles |
|
private |
◆ m_xmax
double PolygonTriangulator::Polygon::m_xmax |
|
private |
◆ m_xmin
double PolygonTriangulator::Polygon::m_xmin |
|
private |
◆ m_ymax
double PolygonTriangulator::Polygon::m_ymax |
|
private |
◆ m_ymin
double PolygonTriangulator::Polygon::m_ymin |
|
private |
The documentation for this class was generated from the following file:
JetConstituentVector::iterator iterator
std::map< unsigned int, Linebase * > LineMap
unsigned int next(const unsigned int &i)
void Delete(const KeyType &keys)
internal_poltrig::PQueue m_qpoints
internal_poltrig::EdgeBST m_edgebst
void handleMergeVertex(const unsigned int &)
void set_contour(const std::vector< double > &x, const std::vector< double > &y)
internal_poltrig::LineMap m_edges
std::priority_queue< Pointbase > PQueue
void handleStartVertex(const unsigned int &)
REAL orient2d(REAL *pa, REAL *pb, REAL *pc)
void triangulateMonotone(internal_poltrig::Monopoly &mpoly)
internal_poltrig::AdjEdgeMap m_startAdjEdgeMap
Pointbase * endPoint(const int &i) const
void handleEndVertex(const unsigned int &)
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
void InOrder(void(*Visit)(BTreeNode< T, KeyType > *u))
void init_vertices_and_lines()
constexpr double poly(const double x)
Evaluates the n-th Legendre polynomial at x.
void FindMaxSmallerThan(const KeyType &keys, BTreeNode< T, KeyType > *&res)
internal_poltrig::Monopolys m_mpolys
void partition2Monotone()
double angleCosb(double *A, double *B, double *C)
internal_poltrig::PointbaseMap m_points
void UpdateKey(BTreeNode< Linebase *, double > *node, double y)
unsigned int selectNextEdge(internal_poltrig::Linebase *edge)
void handleSplitVertex(const unsigned int &)
unsigned int prev(const unsigned int &i)
internal_poltrig::LineMap & edges()
void addDiagonal(const unsigned int &i, const unsigned int &j)
std::list< unsigned int > Monopoly
std::vector< unsigned int > m_nVertices
internal_poltrig::LineMap m_diagonals
void setHelper(const unsigned int &i)
std::vector< unsigned > Triangle
void handleRegularVertexDown(const unsigned int &)
void handleRegularVertexUp(const unsigned int &)