Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
v
w
x
z
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
GitLab
LXR
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
graphics
VP1
VP1HEPVis
src
PolygonTriangulator.h
Go to the documentation of this file.
1
3
// //
4
// Class: PolygonTriangulator //
5
// //
6
// Description: Triangulates any (non-complex) 2D polygon. //
7
// //
8
// Author: Thomas Kittelmann (Thomas.Kittelmann@cern.ch), March 2007 //
9
// //
10
// Notes: //
11
// //
12
// Actual algorithms are adapted from //
13
// http://www.mema.ucl.ac.be/~wu/Poly2Tri/poly2tri.html //
14
// (see copyright notice in .src file) //
15
// //
16
// Main changes performed for the present incarnation are //
17
// interface & namespace changes, indentation, small //
18
// performance tweaks and removal of unused features. //
19
// Most importantly, got rid of static and globals so the class //
20
// can be reliably used more than once per process. Also, the //
21
// output triangles are sorted to preserve "handedness". //
22
// //
24
25
26
#ifndef POLYGONTRIANGULATOR_H
27
#define POLYGONTRIANGULATOR_H
28
29
#include <vector>
30
#include <list>
31
32
class
PolygonTriangulator
{
33
public
:
34
35
typedef
std::vector<unsigned>
Triangle
;
36
typedef
std::list<Triangle>
Triangles
;
37
38
//When constructed it automatically performs the triangulation.
39
PolygonTriangulator
(
const
std::vector<double>& polygon_xcoords,
40
const
std::vector<double>& polygon_ycoords);
41
42
PolygonTriangulator
(
const
PolygonTriangulator
&) =
delete
;
43
PolygonTriangulator
&
operator=
(
const
PolygonTriangulator
&) =
delete
;
44
// Access the result with this
45
const
Triangles
*
triangles
()
const
;
46
47
// Output "handedness" (clockwise or anticlockwise order) is the
48
// same for all of the triangles as it were for the input points.
49
50
//NB: If triangles().size()==0, something went wrong.
51
52
~PolygonTriangulator
();
53
54
private
:
55
class
Polygon
;
56
Polygon
*
m_polygon
;
57
};
58
59
#endif
PolygonTriangulator::~PolygonTriangulator
~PolygonTriangulator()
Definition:
PolygonTriangulator.cxx:2079
PolygonTriangulator::triangles
const Triangles * triangles() const
Definition:
PolygonTriangulator.cxx:2081
PolygonTriangulator::Triangles
std::list< Triangle > Triangles
Definition:
PolygonTriangulator.h:36
PolygonTriangulator::operator=
PolygonTriangulator & operator=(const PolygonTriangulator &)=delete
PolygonTriangulator::m_polygon
Polygon * m_polygon
Definition:
PolygonTriangulator.h:55
PolygonTriangulator::PolygonTriangulator
PolygonTriangulator(const std::vector< double > &polygon_xcoords, const std::vector< double > &polygon_ycoords)
Definition:
PolygonTriangulator.cxx:2072
PolygonTriangulator::PolygonTriangulator
PolygonTriangulator(const PolygonTriangulator &)=delete
PolygonTriangulator
Definition:
PolygonTriangulator.h:32
PolygonTriangulator::Triangle
std::vector< unsigned > Triangle
Definition:
PolygonTriangulator.h:35
PolygonTriangulator::Polygon
Definition:
PolygonTriangulator.cxx:1419
Generated on Tue Mar 25 2025 21:16:59 for ATLAS Offline Software by
1.8.18