Visual Computing Library
Loading...
Searching...
No Matches
poly_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_MESH_H
24#define VCL_MESHES_POLY_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 PolyMeshT;
33
34} // namespace vcl
35
36namespace vcl::polymesh {
37
38template<typename Scalar, bool INDEXED>
39class Vertex;
40
41template<typename Scalar, bool INDEXED>
42class Face;
43
44template<typename Scalar, bool I>
45class Vertex :
46 public vcl::Vertex<
47 PolyMeshT<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::OptionalAdjacentFaces<I, Face<Scalar, I>, Vertex<Scalar, I>>,
54 vert::OptionalAdjacentVertices<I, Vertex<Scalar, I>>,
55 vert::OptionalPrincipalCurvature<Scalar, Vertex<Scalar, I>>,
56 vert::OptionalTexCoord<Scalar, Vertex<Scalar, I>>,
57 vert::OptionalMark<Vertex<Scalar, I>>,
58 vert::CustomComponents<Vertex<Scalar, I>>>
59{
60};
61
62template<typename Scalar, bool I>
63class Face :
64 public vcl::Face<
65 PolyMeshT<Scalar, I>,
66 face::PolygonBitFlags, // 4b
67 face::PolygonVertexRefs<I, Vertex<Scalar, I>, Face<Scalar, I>>,
68 face::Normal3<Scalar>,
69 face::OptionalColor<Face<Scalar, I>>,
70 face::OptionalQuality<Scalar, Face<Scalar, I>>,
71 face::OptionalAdjacentPolygons<I, Face<Scalar, I>>,
72 face::OptionalPolygonWedgeTexCoords<Scalar, Face<Scalar, I>>,
73 face::OptionalMark<Face<Scalar, I>>,
74 face::CustomComponents<Face<Scalar, I>>>
75{
76};
77
78} // namespace vcl::polymesh
79
80namespace vcl {
81
103template<typename Scalar, bool INDEXED>
105 public Mesh<
106 mesh::VertexContainer<polymesh::Vertex<Scalar, INDEXED>>,
107 mesh::FaceContainer<polymesh::Face<Scalar, INDEXED>>,
108 mesh::BoundingBox3<Scalar>,
109 mesh::Color,
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_POLY_MESH_H
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
The PolyMeshT class is a mesh class that represents a polygonal mesh.
Definition poly_mesh.h:115
Scalar ScalarType
The scalar used to store all the data of the Mesh.
Definition poly_mesh.h:118
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 poly_mesh.h:75
Definition poly_mesh.h:59