supereight
mesh.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2016-2019 Emanuele Vespa
3  * SPDX-FileCopyrightText: 2019-2021 Smart Robotics Lab, Imperial College London, Technical University of Munich
4  * SPDX-FileCopyrightText: 2021 Nils Funk
5  * SPDX-FileCopyrightText: 2021 Sotiris Papatheodorou
6  * SPDX-License-Identifier: BSD-3-Clause
7  */
8 
9 #ifndef SE_MESH_FACE_HPP
10 #define SE_MESH_FACE_HPP
11 
12 #include <Eigen/Dense>
13 #include <array>
14 #include <cstdint>
15 #include <vector>
16 
17 namespace se {
18 
19 template<size_t NumVertexes>
20 struct MeshFace {
21  std::array<Eigen::Vector3f, NumVertexes> vertexes;
23  static constexpr size_t num_vertexes = NumVertexes;
24 
25  MeshFace() : max_vertex_scale(0)
26  {
27  vertexes.fill(Eigen::Vector3f::Zero());
28  }
29 };
30 
37 template<typename FaceT>
38 using Mesh = std::vector<FaceT>;
39 
42 
43 typedef MeshFace<4> Quad;
45 
46 } // namespace se
47 
48 #endif // SE_MESH_FACE_HPP
MeshFace()
Definition: mesh.hpp:25
int8_t max_vertex_scale
Definition: mesh.hpp:22
MeshFace< 3 > Triangle
Definition: mesh.hpp:40
MeshFace< 4 > Quad
Definition: mesh.hpp:43
std::vector< FaceT > Mesh
Meshes are represented as lists of faces.
Definition: mesh.hpp:38
Definition: mesh.hpp:20
Mesh< Triangle > TriangleMesh
Definition: mesh.hpp:41
std::array< Eigen::Vector3f, NumVertexes > vertexes
Definition: mesh.hpp:21
Mesh< Quad > QuadMesh
Definition: mesh.hpp:44
static constexpr size_t num_vertexes
Definition: mesh.hpp:23
Helper wrapper to allocate and de-allocate octants in the octree.
Definition: colour_utils.hpp:17