9#ifndef SE_MESH_FACE_HPP
10#define SE_MESH_FACE_HPP
12#include <Eigen/StdVector>
21template<
size_t NumVertexes, Colour ColB>
25template<
size_t NumVertexes>
32template<
size_t NumVertexes, Semantics SemB>
38template<
size_t NumVertexes, Colour ColB = Colour::Off, Semantics SemB = Semantics::Off>
40 std::array<Eigen::Vector3f, NumVertexes>
vertexes;
49 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
60template<
typename FaceT>
61using Mesh = std::vector<FaceT>;
63template<Colour ColB = Colour::Off, Semantics SemB = Semantics::Off>
66template<Colour ColB = Colour::Off, Semantics SemB = Semantics::Off>
69template<Colour ColB = Colour::Off, Semantics SemB = Semantics::Off>
72template<Colour ColB = Colour::Off, Semantics SemB = Semantics::Off>
78template<Colour ColB, Semantics SemB>
89 std::optional<Eigen::Vector3f>
normal;
92 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
95template<
size_t NumFaceVertices = 3>
98 std::vector<Vertex, Eigen::aligned_allocator<Vertex>>
vertices;
107 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
113#include "impl/mesh_impl.hpp"
void merge(const VertexIndexMesh &other)
std::vector< size_t > indices
Definition mesh.hpp:99
std::vector< Vertex, Eigen::aligned_allocator< Vertex > > vertices
Definition mesh.hpp:98
static constexpr size_t num_face_vertices
Definition mesh.hpp:101
Helper wrapper to allocate and de-allocate octants in the octree.
Definition bounded_vector.hpp:14
Mesh< Triangle< ColB, SemB > > TriangleMesh
Definition mesh.hpp:67
TriangleMesh< ColB, SemB > quad_to_triangle_mesh(const QuadMesh< ColB, SemB > &quad_mesh)
Return a triangle mesh containig two triangles for each face of quad_mesh.
std::vector< FaceT > Mesh
Meshes are represented as lists of faces.
Definition mesh.hpp:61
Semantics
Definition setup_util.hpp:20
Colour
Definition setup_util.hpp:19
std::array< RGB, NumVertexes > vertexes
Definition mesh.hpp:27
MeshFaceColourData< NumVertexes, ColB > colour
Definition mesh.hpp:41
static constexpr Semantics sem
Definition mesh.hpp:47
std::int8_t scale
Definition mesh.hpp:43
std::array< Eigen::Vector3f, NumVertexes > vertexes
Definition mesh.hpp:40
static constexpr size_t num_vertexes
Definition mesh.hpp:45
static constexpr Colour col
Definition mesh.hpp:46
MeshFaceSemanticData< NumVertexes, SemB > semantic
Definition mesh.hpp:42
Eigen::Vector3f position
Definition mesh.hpp:88
std::optional< RGB > color
Definition mesh.hpp:90
Vertex(const Eigen::Vector3f &position)
Definition mesh.hpp:84
std::optional< Eigen::Vector3f > normal
Definition mesh.hpp:89