Visual Computing Library
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/mesh.h>
27#include <vclib/mesh/requirements.h>
28
29namespace vcl {
30
31template<typename ScalarType, bool INDEXED>
32class EdgeMeshT;
33
34} // namespace vcl
35
36namespace vcl::edgemesh {
37
38template<typename Scalar, bool INDEXED>
39class Vertex;
40
41template<typename Scalar, bool INDEXED>
42class Edge;
43
44template<typename Scalar, bool I>
45class Vertex :
46 public vcl::Vertex<
47 EdgeMeshT<Scalar, I>,
48 vert::BitFlags,
49 vert::Coordinate3<Scalar>,
50 vert::Normal3<Scalar>,
51 vert::OptionalColor<Vertex<Scalar, I>>,
52 vert::OptionalQuality<Scalar, Vertex<Scalar, I>>,
53 vert::OptionalAdjacentEdges<I, Edge<Scalar, I>, Vertex<Scalar, I>>,
54 vert::OptionalAdjacentVertices<I, Vertex<Scalar, I>>,
55 vert::OptionalTexCoord<Scalar, Vertex<Scalar, I>>,
56 vert::OptionalMark<Vertex<Scalar, I>>,
57 vert::CustomComponents<Vertex<Scalar, I>>>
58{
59};
60
61template<typename Scalar, bool I>
62class Edge :
63 public vcl::Edge<
64 EdgeMeshT<Scalar, I>,
65 edge::BitFlags,
66 edge::VertexReferences<I, Vertex<Scalar, I>, Edge<Scalar, I>>,
67 edge::OptionalNormal3<Scalar, Edge<Scalar, I>>,
68 edge::OptionalColor<Edge<Scalar, I>>,
69 edge::OptionalQuality<Scalar, Edge<Scalar, I>>,
70 edge::OptionalAdjacentEdges<I, Edge<Scalar, I>>,
71 edge::OptionalMark<Edge<Scalar, I>>,
72 edge::CustomComponents<Edge<Scalar, I>>>
73{
74};
75
76} // namespace vcl::edgemesh
77
78namespace vcl {
79
104template<typename Scalar, bool INDEXED>
106 public Mesh<
107 mesh::VertexContainer<edgemesh::Vertex<Scalar, INDEXED>>,
108 mesh::EdgeContainer<edgemesh::Edge<Scalar, INDEXED>>,
109 mesh::BoundingBox3<Scalar>,
110 mesh::Mark,
111 mesh::Name,
112 mesh::TextureImages,
113 mesh::TransformMatrix<Scalar>,
114 mesh::CustomComponents>
115{
116public:
118 using ScalarType = Scalar;
119};
120
125
126} // namespace vcl
127
128#endif // VCL_MESHES_EDGE_MESH_H
The EdgeMeshT class is a mesh class that represents a mesh that stores only vertices and edges (no fa...
Definition edge_mesh.h:115
Scalar ScalarType
The scalar used to store all the data of the Mesh.
Definition edge_mesh.h:118
The Edge class represents an Edge element of the vcl::Mesh class.
Definition edge.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
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
The Vertex class represents an Vertex element of the vcl::Mesh class.
Definition vertex.h:47
Definition edge_mesh.h:73
Definition edge_mesh.h:58