Visual Computing Library
Loading...
Searching...
No Matches
tri_edge_mesh.h
1/*****************************************************************************
2 * VCLib *
3 * Visual Computing Library *
4 * *
5 * Copyright(C) 2021-2025 *
6 * Visual Computing Lab *
7 * ISTI - Italian National Research Council *
8 * *
9 * All rights reserved. *
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the Mozilla Public License Version 2.0 as published *
13 * by the Mozilla Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 * This program is distributed in the hope that it will be useful, *
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
19 * Mozilla Public License Version 2.0 *
20 * (https://www.mozilla.org/en-US/MPL/2.0/) for more details. *
21 ****************************************************************************/
22
23#ifndef VCL_MESHES_TRI_EDGE_MESH_H
24#define VCL_MESHES_TRI_EDGE_MESH_H
25
26#include <vclib/mesh/mesh.h>
27#include <vclib/mesh/requirements.h>
28
29namespace vcl {
30
31template<typename ScalarType, bool INDEXED>
32class TriEdgeMeshT;
33
34} // namespace vcl
35
36namespace vcl::triedgemesh {
37
38template<typename Scalar, bool INDEXED>
39class Vertex;
40
41template<typename Scalar, bool INDEXED>
42class Face;
43
44template<typename Scalar, bool INDEXED>
45class Edge;
46
47template<typename Scalar, bool I>
48class Vertex :
49 public vcl::Vertex<
50 TriEdgeMeshT<Scalar, I>,
51 vert::BitFlags,
52 vert::Coordinate3<Scalar>,
53 vert::Normal3<Scalar>,
54 vert::OptionalColor<Vertex<Scalar, I>>,
55 vert::OptionalQuality<Scalar, Vertex<Scalar, I>>,
56 vert::OptionalAdjacentEdges<I, Edge<Scalar, I>, Vertex<Scalar, I>>,
57 vert::OptionalAdjacentFaces<I, Face<Scalar, I>, Vertex<Scalar, I>>,
58 vert::OptionalAdjacentVertices<I, Vertex<Scalar, I>>,
59 vert::OptionalPrincipalCurvature<Scalar, Vertex<Scalar, I>>,
60 vert::OptionalTexCoord<Scalar, Vertex<Scalar, I>>,
61 vert::OptionalMark<Vertex<Scalar, I>>,
62 vert::CustomComponents<Vertex<Scalar, I>>>
63{
64};
65
66template<typename Scalar, bool I>
67class Face :
68 public vcl::Face<
69 TriEdgeMeshT<Scalar, I>,
70 face::TriangleBitFlags,
71 face::TriangleVertexRefs<I, Vertex<Scalar, I>, Face<Scalar, I>>,
72 face::Normal3<Scalar>,
73 face::OptionalColor<Face<Scalar, I>>,
74 face::OptionalQuality<Scalar, Face<Scalar, I>>,
75 face::OptionalAdjacentTriangles<I, Face<Scalar, I>>,
76 face::OptionalAdjacentEdges<I, Edge<Scalar, I>, Face<Scalar, I>>,
77 face::OptionalTriangleWedgeTexCoords<Scalar, Face<Scalar, I>>,
78 face::OptionalMark<Face<Scalar, I>>,
79 face::CustomComponents<Face<Scalar, I>>>
80{
81};
82
83template<typename Scalar, bool I>
84class Edge :
85 public vcl::Edge<
86 TriEdgeMeshT<Scalar, I>,
87 edge::BitFlags,
88 edge::VertexReferences<I, Vertex<Scalar, I>, Edge<Scalar, I>>,
89 edge::OptionalNormal3<Scalar, Edge<Scalar, I>>,
90 edge::OptionalColor<Edge<Scalar, I>>,
91 edge::OptionalQuality<Scalar, Edge<Scalar, I>>,
92 edge::OptionalAdjacentEdges<I, Edge<Scalar, I>>,
93 edge::OptionalAdjacentFaces<I, Face<Scalar, I>, Edge<Scalar, I>>,
94 edge::OptionalMark<Edge<Scalar, I>>,
95 edge::CustomComponents<Edge<Scalar, I>>>
96{
97};
98
99} // namespace vcl::triedgemesh
100
101namespace vcl {
102
127template<typename Scalar, bool INDEXED>
129 public Mesh<
130 mesh::VertexContainer<triedgemesh::Vertex<Scalar, INDEXED>>,
131 mesh::FaceContainer<triedgemesh::Face<Scalar, INDEXED>>,
132 mesh::EdgeContainer<triedgemesh::Edge<Scalar, INDEXED>>,
133 mesh::BoundingBox3<Scalar>,
134 mesh::Color,
135 mesh::Mark,
136 mesh::Name,
137 mesh::TextureImages,
138 mesh::TransformMatrix<Scalar>,
139 mesh::CustomComponents>
140{
141public:
143 using ScalarType = Scalar;
144};
145
153
161
169
177
178} // namespace vcl
179
180#endif // VCL_MESHES_TRI_EDGE_MESH_H
The Edge class represents an Edge element of the vcl::Mesh class.
Definition edge.h:48
The Face class represents an Face element of the vcl::Mesh class.
Definition face.h:49
The Mesh class represents a generic 3D mesh. A mesh is composed of a generic number of containers of ...
Definition mesh.h:68
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
The TriEdgeMeshT class is a mesh class that represents a triangle mesh with edges.
Definition tri_edge_mesh.h:140
Scalar ScalarType
The scalar used to store all the data of the Mesh.
Definition tri_edge_mesh.h:143
The Vertex class represents an Vertex element of the vcl::Mesh class.
Definition vertex.h:47
Definition tri_edge_mesh.h:96
Definition tri_edge_mesh.h:80
Definition tri_edge_mesh.h:63