5 #include <RobotAPI/interface/ArViz/Elements.h>
16 template <
class PolyhedronTraits_3,
17 class PolyhedronItems_3,
18 template <
class T,
class I,
class A>
39 for (std::size_t i = 0; i < size; ++i)
41 vertices.push_back(armarx::Vector3f{vs[i].x(), vs[i].y(), vs[i].z()});
48 return this->
vertices(vs.data(), vs.size());
53 data_->vertices.assign(vs, vs + size);
59 return this->
vertices(vs.data(), vs.size());
64 data_->colors.assign(cs, cs + size);
70 return this->
colors(cs.data(), cs.size());
75 data_->faces.assign(fs, fs + size);
81 return this->
faces(fs.data(), fs.size());
87 template <
class PolyhedronTraits_3,
88 class PolyhedronItems_3,
89 template <
class T,
class I,
class A>
104 Mesh&
grid2D(Eigen::Vector2f extents, Eigen::Vector2i numPoints,
105 std::function<
viz::Color(
size_t i,
size_t j,
const Eigen::Vector3f& p)> colorFunc);
118 const std::vector<std::vector<viz::data::Color>>&
colors);
137 Eigen::Vector2f extents, Eigen::Vector2i numPoints,
float height = 0);
149 const std::vector<std::vector<Eigen::Vector3f>>& vertices,
150 std::function<
viz::Color(
size_t x,
size_t y,
const Eigen::Vector3f& p)> colorFunc);
163 std::vector<viz::data::Face>
makeGrid2DFaces(
size_t num_x,
size_t num_y);
168 std::vector<T>
flatten(
const std::vector<std::vector<T>>& vector)
170 size_t size = std::accumulate(vector.begin(), vector.end(),
size_t(0), [](
size_t s,
const auto &
v)
177 for (
const auto&
v : vector)
179 for (
const auto& val :
v)