Visual Computing Library  devel
Loading...
Searching...
No Matches
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_EDGE_MESH_H
24#define VCL_MESHES_EDGE_MESH_H
25
26#include <vclib/mesh.h>
27
28namespace vcl {
29
30template<typename ScalarType, bool INDEXED>
31class EdgeMeshT;
32
33} // namespace vcl
34
35namespace vcl::edgemesh {
36
37template<typename Scalar, bool INDEXED>
38class Vertex;
39
40template<typename Scalar, bool INDEXED>
41class Edge;
42
63template<typename Scalar, bool I>
64class Vertex :
65 public vcl::Vertex<
66 EdgeMeshT<Scalar, I>,
67 vert::BitFlags,
68 vert::Position3<Scalar>,
69 vert::Normal3<Scalar>,
70 vert::OptionalColor<Vertex<Scalar, I>>,
71 vert::OptionalQuality<Scalar, Vertex<Scalar, I>>,
72 vert::OptionalAdjacentEdges<I, Edge<Scalar, I>, Vertex<Scalar, I>>,
73 vert::OptionalAdjacentVertices<I, Vertex<Scalar, I>>,
74 vert::OptionalTexCoord<Scalar, Vertex<Scalar, I>>,
75 vert::OptionalMark<Vertex<Scalar, I>>,
76 vert::CustomComponents<Vertex<Scalar, I>>>
77{
78};
79
98template<typename Scalar, bool I>
99class Edge :
100 public vcl::Edge<
101 EdgeMeshT<Scalar, I>,
102 edge::BitFlags,
103 edge::VertexReferences<I, Vertex<Scalar, I>, Edge<Scalar, I>>,
104 edge::OptionalNormal3<Scalar, Edge<Scalar, I>>,
105 edge::OptionalColor<Edge<Scalar, I>>,
106 edge::OptionalQuality<Scalar, Edge<Scalar, I>>,
107 edge::OptionalAdjacentEdges<I, Edge<Scalar, I>>,
108 edge::OptionalMark<Edge<Scalar, I>>,
109 edge::CustomComponents<Edge<Scalar, I>>>
110{
111};
112
113} // namespace vcl::edgemesh
114
115namespace vcl {
116
143template<typename Scalar, bool INDEXED>
145 public Mesh<
146 mesh::VertexContainer<edgemesh::Vertex<Scalar, INDEXED>>,
147 mesh::EdgeContainer<edgemesh::Edge<Scalar, INDEXED>>,
148 mesh::BoundingBox3<Scalar>,
149 mesh::Mark,
150 mesh::Name,
151 mesh::TextureImages,
152 mesh::TransformMatrix<Scalar>,
153 mesh::CustomComponents>
154{
155public:
157 using ScalarType = Scalar;
158};
159
167
175
183
191
192} // namespace vcl
193
194#endif // VCL_MESHES_EDGE_MESH_H
A class representing a box in N-dimensional space.
Definition box.h:46
The EdgeMeshT class is a mesh class that represents a mesh that stores only vertices and edges (no fa...
Definition edge_mesh.h:154
Scalar ScalarType
The scalar used to store all the data of the Mesh.
Definition edge_mesh.h:157
The Edge class represents an Edge element of the vcl::Mesh class.
Definition edge.h:47
The Mesh class represents a generic 3D mesh. A mesh is composed of a generic number of containers of ...
Definition mesh.h:68
The Vertex class represents an Vertex element of the vcl::Mesh class.
Definition vertex.h:46
The Edge type used by the EdgeMeshT class.
Definition edge_mesh.h:110
The Vertex type used by the EdgeMeshT class.
Definition edge_mesh.h:77