Visual Computing Library  devel
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.h>
27
28namespace vcl {
29
30template<typename ScalarType, bool INDEXED>
31class TriEdgeMeshT;
32
33} // namespace vcl
34
35namespace vcl::triedgemesh {
36
37template<typename Scalar, bool INDEXED>
38class Vertex;
39
40template<typename Scalar, bool INDEXED>
41class Face;
42
43template<typename Scalar, bool INDEXED>
44class Edge;
45
67template<typename Scalar, bool I>
68class Vertex :
69 public vcl::Vertex<
70 TriEdgeMeshT<Scalar, I>,
71 vert::BitFlags,
72 vert::Position3<Scalar>,
73 vert::Normal3<Scalar>,
74 vert::OptionalColor<Vertex<Scalar, I>>,
75 vert::OptionalQuality<Scalar, Vertex<Scalar, I>>,
76 vert::OptionalAdjacentEdges<I, Edge<Scalar, I>, Vertex<Scalar, I>>,
77 vert::OptionalAdjacentFaces<I, Face<Scalar, I>, Vertex<Scalar, I>>,
78 vert::OptionalAdjacentVertices<I, Vertex<Scalar, I>>,
79 vert::OptionalPrincipalCurvature<Scalar, Vertex<Scalar, I>>,
80 vert::OptionalTexCoord<Scalar, Vertex<Scalar, I>>,
81 vert::OptionalMark<Vertex<Scalar, I>>,
82 vert::CustomComponents<Vertex<Scalar, I>>>
83{
84};
85
106template<typename Scalar, bool I>
107class Face :
108 public vcl::Face<
109 TriEdgeMeshT<Scalar, I>,
110 face::TriangleBitFlags,
111 face::TriangleVertexRefs<I, Vertex<Scalar, I>, Face<Scalar, I>>,
112 face::Normal3<Scalar>,
113 face::OptionalColor<Face<Scalar, I>>,
114 face::OptionalQuality<Scalar, Face<Scalar, I>>,
115 face::OptionalAdjacentTriangles<I, Face<Scalar, I>>,
116 face::OptionalAdjacentEdges<I, Edge<Scalar, I>, Face<Scalar, I>>,
117 face::OptionalTriangleWedgeTexCoords<Scalar, Face<Scalar, I>>,
118 face::OptionalMark<Face<Scalar, I>>,
119 face::CustomComponents<Face<Scalar, I>>>
120{
121};
122
142template<typename Scalar, bool I>
143class Edge :
144 public vcl::Edge<
145 TriEdgeMeshT<Scalar, I>,
146 edge::BitFlags,
147 edge::VertexReferences<I, Vertex<Scalar, I>, Edge<Scalar, I>>,
148 edge::OptionalNormal3<Scalar, Edge<Scalar, I>>,
149 edge::OptionalColor<Edge<Scalar, I>>,
150 edge::OptionalQuality<Scalar, Edge<Scalar, I>>,
151 edge::OptionalAdjacentEdges<I, Edge<Scalar, I>>,
152 edge::OptionalAdjacentFaces<I, Face<Scalar, I>, Edge<Scalar, I>>,
153 edge::OptionalMark<Edge<Scalar, I>>,
154 edge::CustomComponents<Edge<Scalar, I>>>
155{
156};
157
158} // namespace vcl::triedgemesh
159
160namespace vcl {
161
187template<typename Scalar, bool INDEXED>
189 public Mesh<
190 mesh::VertexContainer<triedgemesh::Vertex<Scalar, INDEXED>>,
191 mesh::FaceContainer<triedgemesh::Face<Scalar, INDEXED>>,
192 mesh::EdgeContainer<triedgemesh::Edge<Scalar, INDEXED>>,
193 mesh::BoundingBox3<Scalar>,
194 mesh::Color,
195 mesh::Mark,
196 mesh::Name,
197 mesh::TextureImages,
198 mesh::TransformMatrix<Scalar>,
199 mesh::CustomComponents>
200{
201public:
203 using ScalarType = Scalar;
204};
205
213
221
229
237
238} // namespace vcl
239
240#endif // VCL_MESHES_TRI_EDGE_MESH_H
A class representing a box in N-dimensional space.
Definition box.h:46
The Edge class represents an Edge element of the vcl::Mesh class.
Definition edge.h:47
The Face class represents an Face element of the vcl::Mesh class.
Definition face.h:48
The Mesh class represents a generic 3D mesh. A mesh is composed of a generic number of containers of ...
Definition mesh.h:68
The TriEdgeMeshT class is a mesh class that represents a triangle mesh with edges.
Definition tri_edge_mesh.h:200
Scalar ScalarType
The scalar used to store all the data of the Mesh.
Definition tri_edge_mesh.h:203
The Vertex class represents an Vertex element of the vcl::Mesh class.
Definition vertex.h:46
The Edge type used by the TriEdgeMeshT class.
Definition tri_edge_mesh.h:155
The Face type used by the TriEdgeMeshT class.
Definition tri_edge_mesh.h:120
The Vertex type used by the TriEdgeMeshT class.
Definition tri_edge_mesh.h:83