Loading [MathJax]/extensions/tex2jax.js
ed
Main Page
Namespaces
Namespace List
Namespace Members
All
a
c
d
e
f
g
i
l
m
n
p
r
s
t
u
v
w
Functions
c
d
e
f
g
i
l
n
p
r
s
w
Variables
Typedefs
e
i
m
p
r
s
t
u
w
Enumerations
Enumerator
Classes
Class List
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
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Typedefs
Related Functions
Files
File List
File Members
All
b
c
d
e
g
h
i
l
m
p
r
s
t
u
x
Functions
b
c
d
g
h
i
l
m
p
s
t
u
x
Variables
Enumerations
Enumerator
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
src
convex_hull_2d.cpp
Go to the documentation of this file.
1
#include "
ed/convex_hull_2d.h
"
2
3
namespace
ed
4
{
5
6
double
ConvexHull2D::area
()
const
7
{
8
double
a
= 0.0;
9
for
( pcl::PointCloud<pcl::PointXYZ>::const_iterator ch_it =
chull
.begin(); ch_it !=
chull
.end(); ++ch_it)
10
{
11
double
x1 = ch_it->x;
12
double
y1 = ch_it->y;
13
double
x2;
14
double
y2;
15
if
(ch_it !=
chull
.end()-1)
16
{
17
x2 = (ch_it+1)->x;
18
y2 = (ch_it+1)->y;
19
}
else
20
{
21
x2 =
chull
.begin()->x;
22
y2 =
chull
.begin()->y;
23
}
24
a
=
a
+ 0.5*(x1*y2 - x2*y1);
25
}
26
return
a
;
27
}
28
29
double
ConvexHull2D::height
()
const
30
{
31
return
max_z
-
min_z
;
32
}
33
34
double
ConvexHull2D::volume
()
const
35
{
36
return
area
() *
height
();
37
}
38
39
}
convex_hull_2d.h
a
void a()
ed::ConvexHull2D::chull
pcl::PointCloud< pcl::PointXYZ > chull
Definition:
convex_hull_2d.h:20
ed::ConvexHull2D::max_z
double max_z
Definition:
convex_hull_2d.h:21
ed::ConvexHull2D::min_z
double min_z
Definition:
convex_hull_2d.h:21
ed
Definition:
convex_hull.h:8
ed::ConvexHull2D::height
double height() const
Definition:
convex_hull_2d.cpp:29
ed::ConvexHull2D::volume
double volume() const
Definition:
convex_hull_2d.cpp:34
ed::ConvexHull2D::area
double area() const
Definition:
convex_hull_2d.cpp:6
Generated on Tue Apr 8 2025 04:36:56 for ed by
1.8.17