1#ifndef GLK_PRIMITIVES_MESH_UTILS_HPP
2#define GLK_PRIMITIVES_MESH_UTILS_HPP
6#include <Eigen/Geometry>
23 for (
int j = 0;
j < 3;
j++) {
39 NormalEstimater(
const std::vector<Eigen::Vector3f>& vertices,
const std::vector<int>& indices) {
40 normals.resize(vertices.size(), Eigen::Vector3f::Zero());
41 for (
int i = 0;
i < indices.size();
i += 3) {
42 Eigen::Vector3f
v1 = vertices[indices[
i]];
43 Eigen::Vector3f
v2 = vertices[indices[
i + 1]];
44 Eigen::Vector3f
v3 = vertices[indices[
i + 2]];
Definition mesh_utils.hpp:10
Flatize(const std::vector< Eigen::Vector3f > &vertices_, const std::vector< int > &indices_)
Definition mesh_utils.hpp:12
std::vector< int > indices
Definition mesh_utils.hpp:34
std::vector< Eigen::Vector3f > vertices
Definition mesh_utils.hpp:32
std::vector< Eigen::Vector3f > normals
Definition mesh_utils.hpp:33
Definition mesh_utils.hpp:37
NormalEstimater(const std::vector< Eigen::Vector3f > &vertices, const std::vector< int > &indices)
Definition mesh_utils.hpp:39
std::vector< Eigen::Vector3f > normals
Definition mesh_utils.hpp:59
Definition async_buffer_copy.hpp:6
std::enable_if_t< needs_aligned_allocator< T >::value, std::shared_ptr< T > > make_shared(Args &&... args)
Definition make_shared.hpp:20