Visual Computing Library  devel
Loading...
Searching...
No Matches
edge_components.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_MESH_ELEMENTS_EDGE_COMPONENTS_H
24#define VCL_MESH_ELEMENTS_EDGE_COMPONENTS_H
25
26#include "../components/adjacent_edges.h"
27#include "../components/adjacent_faces.h"
28#include "../components/bit_flags.h"
29#include "../components/color.h"
30#include "../components/custom_components.h"
31#include "../components/mark.h"
32#include "../components/normal.h"
33#include "../components/parent_mesh_pointer.h"
34#include "../components/quality.h"
35#include "../components/vertex_references.h"
36
54namespace vcl::edge {
55
61/* Port concepts into the edge namespace */
62template<typename T>
64template<typename T>
66template<typename T>
68template<typename T>
70template<typename T>
72template<typename T>
74template<typename T>
76template<typename T>
78template<typename T>
80template<typename T>
82template<typename T>
84template<typename T>
86template<typename T>
88template<typename T>
90template<typename T>
92
// end of group
94
100/* Port AdjacentEdges class into edge namespace */
101template<bool INDEXED, typename ParentEdgeType>
102using AdjacentEdges =
103 comp::AdjacentEdges<INDEXED, ParentEdgeType, -1, false, ParentEdgeType>;
104
105template<bool INDEXED, typename ParentEdgeType>
106using VerticalAdjacentEdges = comp::
107 AdjacentEdges<INDEXED, ParentEdgeType, -1, false, ParentEdgeType, true>;
108
109template<bool INDEXED, typename ParentEdgeType>
110using OptionalAdjacentEdges = comp::AdjacentEdges<
111 INDEXED,
112 ParentEdgeType,
113 -1,
114 false,
115 ParentEdgeType,
116 true,
117 true>;
118
119template<typename ParentEdgeType>
120using AdjacentEdgeIndices =
121 comp::AdjacentEdges<true, ParentEdgeType, -1, false, ParentEdgeType>;
122
123template<typename ParentEdgeType>
124using VerticalAdjacentEdgeIndices =
125 comp::AdjacentEdges<true, ParentEdgeType, -1, false, ParentEdgeType, true>;
126
127template<typename ParentEdgeType>
128using OptionalAdjacentEdgeIndices = comp::
129 AdjacentEdges<true, ParentEdgeType, -1, false, ParentEdgeType, true, true>;
130
131template<typename ParentEdgeType>
132using AdjacentEdgePointers =
133 comp::AdjacentEdges<false, ParentEdgeType, -1, false, ParentEdgeType>;
134
135template<typename ParentEdgeType>
136using VerticalAdjacentEdgePointers =
137 comp::AdjacentEdges<false, ParentEdgeType, -1, false, ParentEdgeType, true>;
138
139template<typename ParentEdgeType>
140using OptionalAdjacentEdgePointers = comp::
141 AdjacentEdges<false, ParentEdgeType, -1, false, ParentEdgeType, true, true>;
142
143/* Port AdjacentFaces class into edge namespace */
144template<bool INDEXED, typename FaceType, typename ParentEdgeType>
145using AdjacentFaces =
146 comp::AdjacentFaces<INDEXED, FaceType, -1, false, ParentEdgeType>;
147
148template<bool INDEXED, typename FaceType, typename ParentEdgeType>
149using VerticalAdjacentFaces =
150 comp::AdjacentFaces<INDEXED, FaceType, -1, false, ParentEdgeType, true>;
151
152template<bool INDEXED, typename FaceType, typename ParentEdgeType>
153using OptionalAdjacentFaces = comp::
154 AdjacentFaces<INDEXED, FaceType, -1, false, ParentEdgeType, true, true>;
155
156template<typename FaceType, typename ParentEdgeType>
157using AdjacentFaceIndices =
158 comp::AdjacentFaces<true, FaceType, -1, false, ParentEdgeType>;
159
160template<typename FaceType, typename ParentEdgeType>
161using VerticalAdjacentFaceIndices =
162 comp::AdjacentFaces<true, FaceType, -1, false, ParentEdgeType, true>;
163
164template<typename FaceType, typename ParentEdgeType>
165using OptionalAdjacentFaceIndices =
166 comp::AdjacentFaces<true, FaceType, -1, false, ParentEdgeType, true, true>;
167
168template<typename FaceType, typename ParentEdgeType>
169using AdjacentFacePointers =
170 comp::AdjacentFaces<false, FaceType, -1, false, ParentEdgeType>;
171
172template<typename FaceType, typename ParentEdgeType>
173using VerticalAdjacentFacePointers =
174 comp::AdjacentFaces<false, FaceType, -1, false, ParentEdgeType, true>;
175
176template<typename FaceType, typename ParentEdgeType>
177using OptionalAdjacentFacePointers =
178 comp::AdjacentFaces<false, FaceType, -1, false, ParentEdgeType, true, true>;
179
180/* Port BitFlags class into edge namespace */
181using BitFlags = comp::BitFlags<>;
182
183/* Port Color class into edge namespace */
184using Color = comp::Color<>;
185
186template<typename ParentEdgeType>
187using VerticalColor = comp::Color<ParentEdgeType>;
188
189template<typename ParentEdgeType>
190using OptionalColor = comp::Color<ParentEdgeType, true>;
191
192/* Port CustomComponents class into edge namespace */
193template<typename ParentEdgeType>
194using CustomComponents = comp::CustomComponents<ParentEdgeType>;
195
196/* Port Mark class into edge namespace */
197using Mark = comp::Mark<>;
198
199template<typename ParentEdgeType>
200using VerticalMark = comp::Mark<ParentEdgeType>;
201
202template<typename ParentEdgeType>
203using OptionalMark = comp::Mark<ParentEdgeType, true>;
204
205/* Port Normal classes into edge namespace */
206template<typename ScalarType, int N>
207using Normal = comp::Normal<Point<ScalarType, N>>;
208
209template<typename ScalarType>
210using Normal3 = comp::Normal3<ScalarType>;
211
212using Normal3f = comp::Normal3f<>;
213using Normal3d = comp::Normal3d<>;
214
215template<typename ScalarType, int N, typename ParentEdgeType>
216using VerticalNormal = comp::Normal<Point<ScalarType, N>, ParentEdgeType>;
217
218template<typename ScalarType, typename ParentEdgeType>
219using VerticalNormal3 = comp::Normal3<ScalarType, ParentEdgeType>;
220
221template<typename ParentEdgeType>
222using VerticalNormal3f = comp::Normal3f<ParentEdgeType>;
223
224template<typename ParentEdgeType>
225using VerticalNormal3d = comp::Normal3d<ParentEdgeType>;
226
227template<typename ScalarType, int N, typename ParentEdgeType>
228using OptionalNormal = comp::Normal<Point<ScalarType, N>, ParentEdgeType, true>;
229
230template<typename ScalarType, typename ParentEdgeType>
231using OptionalNormal3 = comp::Normal3<ScalarType, ParentEdgeType, true>;
232
233template<typename ParentEdgeType>
234using OptionalNormal3f = comp::Normal3f<ParentEdgeType, true>;
235
236template<typename ParentEdgeType>
237using OptionalNormal3d = comp::Normal3d<ParentEdgeType, true>;
238
239/* Port ParentMeshPointer class into vert namespace */
240template<typename MeshType>
241using ParentMeshPointer = comp::ParentMeshPointer<MeshType>;
242
243/* Port Quality class into edge namespace */
244template<typename QualityType>
245using Quality = comp::Quality<QualityType>;
246
247using Qualityf = comp::Qualityf<>;
248using Qualityd = comp::Qualityd<>;
249
250template<typename QualityType, typename ParentEdgeType>
251using VerticalQuality = comp::Quality<QualityType, ParentEdgeType>;
252
253template<typename ParentEdgeType>
254using VerticalQualityf = comp::Quality<float, ParentEdgeType>;
255
256template<typename ParentEdgeType>
257using VerticalQualityd = comp::Quality<double, ParentEdgeType>;
258
259template<typename QualityType, typename ParentEdgeType>
260using OptionalQuality = comp::Quality<QualityType, ParentEdgeType, true>;
261
262template<typename ParentEdgeType>
263using OptionalQualityf = comp::Quality<float, ParentEdgeType, true>;
264
265template<typename ParentEdgeType>
266using OptionalQualityd = comp::Quality<double, ParentEdgeType, true>;
267
268/* Port VertexReferences alias into edge namespace */
269template<bool INDEXED, typename VertexType, typename EdgeType>
270using VertexReferences =
271 comp::VertexReferences<INDEXED, VertexType, 2, EdgeType>;
272
273template<typename VertexType, typename EdgeType>
274using VertexIndices = comp::VertexReferences<true, VertexType, 2, EdgeType>;
275
276template<typename VertexType, typename EdgeType>
277using VertexPointers = comp::VertexReferences<false, VertexType, 2, EdgeType>;
278
// end of edge_components group
280
281} // namespace vcl::edge
282
283#endif // VCL_MESH_ELEMENTS_EDGE_COMPONENTS_H
A concept that checks whether a type T (that should be a Element) has the AdjacentEdges component (in...
Definition adjacent_edges.h:668
A concept that checks whether a type T (that should be a Element) has the AdjacentFaces component (in...
Definition adjacent_faces.h:672
A concept that checks whether a type T (that should be an Element) has the one of the BitFlags compon...
Definition bit_flags.h:101
A concept that checks whether a type T (that should be a Element or a Mesh) has the Color component (...
Definition color.h:132
A concept that checks whether a type T (that should be an Element or a Mesh) has the CustomComponents...
Definition custom_components.h:316
A concept that checks whether a type T (that should be a Element or a Mesh) has the Mark component (i...
Definition mark.h:198
A concept that checks whether a type T (that should be a Element) has the Normal component (inherits ...
Definition normal.h:133
A concept that checks whether a type T (that should be a Element) has the AdjacentEdges component (in...
Definition adjacent_edges.h:682
A concept that checks whether a type T (that should be a Element) has the AdjacentFaces component (in...
Definition adjacent_faces.h:686
A concept that checks whether a type T (that should be a Element or a Mesh) has the Color component (...
Definition color.h:144
A concept that checks whether a type T (that should be a Element or a Mesh) has the Mark component (i...
Definition mark.h:210
A concept that checks whether a type T (that should be a Element) has the Normal component (inherits ...
Definition normal.h:146
A concept that checks whether a type T (that should be a Element or a Mesh) has the Quality component...
Definition quality.h:144
A concept that checks whether a type T (that should be a Element or a Mesh) has the Quality component...
Definition quality.h:132
A concept that checks whether a type T (that should be a Element) has the VertexReferences component ...
Definition vertex_references.h:712
Definition edge_components.h:63
Definition edge_components.h:67
Definition edge_components.h:71
Definition edge_components.h:73
Definition edge_components.h:77
Definition edge_components.h:79
Definition edge_components.h:83
Definition edge_components.h:65
Definition edge_components.h:69
Definition edge_components.h:75
Definition edge_components.h:81
Definition edge_components.h:85
Definition edge_components.h:89
Definition edge_components.h:87
Definition edge_components.h:91