Visual Computing Library  devel
Loading...
Searching...
No Matches
poly_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_POLY_EDGE_MESH_H
24#define VCL_MESHES_POLY_EDGE_MESH_H
25
26#include <vclib/mesh.h>
27
28namespace vcl {
29
30template<typename ScalarType, bool INDEXED>
31class PolyEdgeMeshT;
32
33} // namespace vcl
34
35namespace vcl::polyedgemesh {
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
68template<typename Scalar, bool I>
69class Vertex :
70 public vcl::Vertex<
71 PolyEdgeMeshT<Scalar, I>,
72 vert::BitFlags,
73 vert::Position3<Scalar>,
74 vert::Normal3<Scalar>,
75 vert::OptionalColor<Vertex<Scalar, I>>,
76 vert::OptionalQuality<Scalar, Vertex<Scalar, I>>,
77 vert::OptionalAdjacentEdges<I, Edge<Scalar, I>, Vertex<Scalar, I>>,
78 vert::OptionalAdjacentFaces<I, Face<Scalar, I>, Vertex<Scalar, I>>,
79 vert::OptionalAdjacentVertices<I, Vertex<Scalar, I>>,
80 vert::OptionalPrincipalCurvature<Scalar, Vertex<Scalar, I>>,
81 vert::OptionalTexCoord<Scalar, Vertex<Scalar, I>>,
82 vert::OptionalMark<Vertex<Scalar, I>>,
83 vert::CustomComponents<Vertex<Scalar, I>>>
84{
85};
86
107template<typename Scalar, bool I>
108class Face :
109 public vcl::Face<
110 PolyEdgeMeshT<Scalar, I>,
111 face::PolygonBitFlags,
112 face::PolygonVertexRefs<I, Vertex<Scalar, I>, Face<Scalar, I>>,
113 face::Normal3<Scalar>,
114 face::OptionalColor<Face<Scalar, I>>,
115 face::OptionalQuality<Scalar, Face<Scalar, I>>,
116 face::OptionalAdjacentPolygons<I, Face<Scalar, I>>,
117 face::OptionalAdjacentEdges<I, Edge<Scalar, I>, Face<Scalar, I>>,
118 face::OptionalPolygonWedgeTexCoords<Scalar, Face<Scalar, I>>,
119 face::OptionalMark<Face<Scalar, I>>,
120 face::CustomComponents<Face<Scalar, I>>>
121{
122};
123
143template<typename Scalar, bool I>
144class Edge :
145 public vcl::Edge<
146 PolyEdgeMeshT<Scalar, I>,
147 edge::BitFlags,
148 edge::VertexReferences<I, Vertex<Scalar, I>, Edge<Scalar, I>>,
149 edge::OptionalNormal3<Scalar, Edge<Scalar, I>>,
150 edge::OptionalColor<Edge<Scalar, I>>,
151 edge::OptionalQuality<Scalar, Edge<Scalar, I>>,
152 edge::OptionalAdjacentEdges<I, Edge<Scalar, I>>,
153 edge::OptionalAdjacentFaces<I, Face<Scalar, I>, Edge<Scalar, I>>,
154 edge::OptionalMark<Edge<Scalar, I>>,
155 edge::CustomComponents<Edge<Scalar, I>>>
156{
157};
158
159} // namespace vcl::polyedgemesh
160
161namespace vcl {
162
188template<typename Scalar, bool INDEXED>
190 public Mesh<
191 mesh::VertexContainer<polyedgemesh::Vertex<Scalar, INDEXED>>,
192 mesh::FaceContainer<polyedgemesh::Face<Scalar, INDEXED>>,
193 mesh::EdgeContainer<polyedgemesh::Edge<Scalar, INDEXED>>,
194 mesh::BoundingBox3<Scalar>,
195 mesh::Color,
196 mesh::Mark,
197 mesh::Name,
198 mesh::TextureImages,
199 mesh::TransformMatrix<Scalar>,
200 mesh::CustomComponents>
201{
202public:
204 using ScalarType = Scalar;
205};
206
214
222
230
238
239} // namespace vcl
240
241#endif // VCL_MESHES_POLY_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 PolyEdgeMeshT class is a mesh class that represents a polygonal mesh with edges.
Definition poly_edge_mesh.h:201
Scalar ScalarType
The scalar used to store all the data of the Mesh.
Definition poly_edge_mesh.h:204
The Vertex class represents an Vertex element of the vcl::Mesh class.
Definition vertex.h:46
The Edge type used by the PolyEdgeMeshT class.
Definition poly_edge_mesh.h:156
The Face type used by the PolyEdgeMeshT class.
Definition poly_edge_mesh.h:121
The Vertex type used by the PolyEdgeMeshT class.
Definition poly_edge_mesh.h:84