Path.cpp
Go to the documentation of this file.
1
#include "
Path.h
"
2
3
#include <iterator>
4
5
#include <ArmarXCore/interface/core/BasicVectorTypes.h>
6
#include <ArmarXCore/interface/core/BasicVectorTypesHelpers.h>
7
8
namespace
armarx::viz
9
{
10
11
Path
&
12
Path::clear
()
13
{
14
data_
->points.clear();
15
16
return
*
this
;
17
}
18
19
Path
&
20
Path::width
(
float
w)
21
{
22
data_
->lineWidth = w;
23
24
return
*
this
;
25
}
26
27
Path
&
28
Path::points
(std::vector<Eigen::Vector3f>
const
& ps)
29
{
30
auto
&
points
=
data_
->points;
31
points
.clear();
32
points
.reserve(ps.size());
33
34
std::transform(ps.begin(),
35
ps.end(),
36
std::back_inserter(
points
),
37
[](
const
auto
& e) { return ToBasicVectorType(e); });
38
39
return
*
this
;
40
}
41
42
Path
&
43
Path::addPoint
(Eigen::Vector3f p)
44
{
45
data_
->points.emplace_back(ToBasicVectorType(p));
46
47
return
*
this
;
48
}
49
50
}
// namespace armarx::viz
Path.h
armarx::viz::ElementOps< Path, data::ElementPath >::data_
IceInternal::Handle< data::ElementPath > data_
Definition
ElementOps.h:315
armarx::viz::Path
Definition
Path.h:32
armarx::viz::Path::points
Path & points(std::vector< Eigen::Vector3f > const &ps)
Definition
Path.cpp:28
armarx::viz::Path::clear
Path & clear()
Definition
Path.cpp:12
armarx::viz::Path::width
Path & width(float w)
Definition
Path.cpp:20
armarx::viz::Path::addPoint
Path & addPoint(Eigen::Vector3f p)
Definition
Path.cpp:43
armarx::viz
This file is part of ArmarX.
Definition
ArVizStorage.cpp:423
RobotAPI
components
ArViz
Client
elements
Path.cpp
Generated by
1.13.2