Visual Computing Library  devel
Loading...
Searching...
No Matches
vertex_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_VERTEX_COMPONENTS_H
24#define VCL_MESH_ELEMENTS_VERTEX_COMPONENTS_H
25
26#include "../components/adjacent_edges.h"
27#include "../components/adjacent_faces.h"
28#include "../components/adjacent_vertices.h"
29#include "../components/bit_flags.h"
30#include "../components/color.h"
31#include "../components/custom_components.h"
32#include "../components/mark.h"
33#include "../components/normal.h"
34#include "../components/parent_mesh_pointer.h"
35#include "../components/position.h"
36#include "../components/principal_curvature.h"
37#include "../components/quality.h"
38#include "../components/tex_coord.h"
39
58namespace vcl::vert {
59
65/* Port concepts into the vert namespace */
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>
92template<typename T>
94template<typename T>
96template<typename T>
98template<typename T>
100template<typename T>
102template<typename T>
104template<typename T>
106template<typename T>
108
// end of group
110
116/* Port AdjacentEdges class into vert namespace */
117template<bool INDEXED, typename EdgeType, typename ParentVertexType>
118using AdjacentEdges =
119 comp::AdjacentEdges<INDEXED, EdgeType, -1, false, ParentVertexType>;
120
121template<bool INDEXED, typename EdgeType, typename ParentVertexType>
122using VerticalAdjacentEdges =
123 comp::AdjacentEdges<INDEXED, EdgeType, -1, false, ParentVertexType, true>;
124
125template<bool INDEXED, typename EdgeType, typename ParentVertexType>
126using OptionalAdjacentEdges = comp::
127 AdjacentEdges<INDEXED, EdgeType, -1, false, ParentVertexType, true, true>;
128
129template<typename EdgeType, typename ParentVertexType>
130using AdjacentEdgeIndices =
131 comp::AdjacentEdges<true, EdgeType, -1, false, ParentVertexType>;
132
133template<typename EdgeType, typename ParentVertexType>
134using VerticalAdjacentEdgeIndices =
135 comp::AdjacentEdges<true, EdgeType, -1, false, ParentVertexType, true>;
136
137template<typename EdgeType, typename ParentVertexType>
138using OptionalAdjacentEdgeIndices = comp::
139 AdjacentEdges<true, EdgeType, -1, false, ParentVertexType, true, true>;
140
141template<typename EdgeType, typename ParentVertexType>
142using AdjacentEdgePointers =
143 comp::AdjacentEdges<false, EdgeType, -1, false, ParentVertexType>;
144
145template<typename EdgeType, typename ParentVertexType>
146using VerticalAdjacentEdgePointers =
147 comp::AdjacentEdges<false, EdgeType, -1, false, ParentVertexType, true>;
148
149template<typename EdgeType, typename ParentVertexType>
150using OptionalAdjacentEdgePointers = comp::
151 AdjacentEdges<false, EdgeType, -1, false, ParentVertexType, true, true>;
152
153/* Port AdjacentFaces class into vert namespace */
154template<bool INDEXED, typename FaceType, typename ParentVertexType>
155using AdjacentFaces =
156 comp::AdjacentFaces<INDEXED, FaceType, -1, false, ParentVertexType>;
157
158template<bool INDEXED, typename FaceType, typename ParentVertexType>
159using VerticalAdjacentFaces =
160 comp::AdjacentFaces<INDEXED, FaceType, -1, false, ParentVertexType, true>;
161
162template<bool INDEXED, typename FaceType, typename ParentVertexType>
163using OptionalAdjacentFaces = comp::
164 AdjacentFaces<INDEXED, FaceType, -1, false, ParentVertexType, true, true>;
165
166template<typename FaceType, typename ParentVertexType>
167using AdjacentFaceIndices =
168 comp::AdjacentFaces<true, FaceType, -1, false, ParentVertexType>;
169
170template<typename FaceType, typename ParentVertexType>
171using VerticalAdjacentFaceIndices =
172 comp::AdjacentFaces<true, FaceType, -1, false, ParentVertexType, true>;
173
174template<typename FaceType, typename ParentVertexType>
175using OptionalAdjacentFaceIndices = comp::
176 AdjacentFaces<true, FaceType, -1, false, ParentVertexType, true, true>;
177
178template<typename FaceType, typename ParentVertexType>
179using AdjacentFacePointers =
180 comp::AdjacentFaces<false, FaceType, -1, false, ParentVertexType>;
181
182template<typename FaceType, typename ParentVertexType>
183using VerticalAdjacentFacePointers =
184 comp::AdjacentFaces<false, FaceType, -1, false, ParentVertexType, true>;
185
186template<typename FaceType, typename ParentVertexType>
187using OptionalAdjacentFacePointers = comp::
188 AdjacentFaces<false, FaceType, -1, false, ParentVertexType, true, true>;
189
190/* Port AdjacentVertices class into vert namespace */
191template<bool INDEXED, typename ParentVertexType>
192using AdjacentVertices =
193 comp::AdjacentVertices<INDEXED, ParentVertexType, ParentVertexType>;
194
195template<bool INDEXED, typename ParentVertexType>
196using VerticalAdjacentVertices =
197 comp::AdjacentVertices<INDEXED, ParentVertexType, ParentVertexType, true>;
198
199template<bool INDEXED, typename ParentVertexType>
200using OptionalAdjacentVertices = comp::
201 AdjacentVertices<INDEXED, ParentVertexType, ParentVertexType, true, true>;
202
203template<typename ParentVertexType>
204using AdjacentVertexIndices =
205 comp::AdjacentVertices<true, ParentVertexType, ParentVertexType>;
206
207template<typename ParentVertexType>
208using VerticalAdjacentVertexIndices =
209 comp::AdjacentVertices<true, ParentVertexType, ParentVertexType, true>;
210
211template<typename ParentVertexType>
212using OptionalAdjacentVertexIndices = comp::
213 AdjacentVertices<true, ParentVertexType, ParentVertexType, true, true>;
214
215template<typename ParentVertexType>
216using AdjacentVertexPointers =
217 comp::AdjacentVertices<false, ParentVertexType, ParentVertexType>;
218
219template<typename ParentVertexType>
220using VerticalAdjacentVertexPointers =
221 comp::AdjacentVertices<false, ParentVertexType, ParentVertexType, true>;
222
223template<typename ParentVertexType>
224using OptionalAdjacentVertexPointers = comp::
225 AdjacentVertices<false, ParentVertexType, ParentVertexType, true, true>;
226
227/* Port BitFlags class into vert namespace */
228using BitFlags = comp::BitFlags<>;
229
230template<typename ParentVertexType>
231using VerticalBitFlags = comp::BitFlags<ParentVertexType>;
232
233/* Port Color class into vert namespace */
234using Color = comp::Color<>;
235
236template<typename ParentVertexType>
237using VerticalColor = comp::Color<ParentVertexType>;
238
239template<typename ParentVertexType>
240using OptionalColor = comp::Color<ParentVertexType, true>;
241
242/* Port CustomComponents class into vert namespace */
243template<typename ParentVertexType>
244using CustomComponents = comp::CustomComponents<ParentVertexType>;
245
246/* Port Mark class into vert namespace */
247using Mark = comp::Mark<>;
248
249template<typename ParentVertexType>
250using VerticalMark = comp::Mark<ParentVertexType>;
251
252template<typename ParentVertexType>
253using OptionalMark = comp::Mark<ParentVertexType, true>;
254
255/* Port Normal classes into vert namespace */
256template<typename ScalarType, int N>
257using Normal = comp::Normal<Point<ScalarType, N>>;
258
259template<typename ScalarType>
260using Normal3 = comp::Normal3<ScalarType>;
261
262using Normal3f = comp::Normal3f<>;
263using Normal3d = comp::Normal3d<>;
264
265template<typename ScalarType, int N, typename ParentVertexType>
266using VerticalNormal = comp::Normal<Point<ScalarType, N>, ParentVertexType>;
267
268template<typename ScalarType, typename ParentVertexType>
269using VerticalNormal3 = comp::Normal3<ScalarType, ParentVertexType>;
270
271template<typename ParentVertexType>
272using VerticalNormal3f = comp::Normal3f<ParentVertexType>;
273
274template<typename ParentVertexType>
275using VerticalNormal3d = comp::Normal3d<ParentVertexType>;
276
277template<typename ScalarType, int N, typename ParentVertexType>
278using OptionalNormal =
279 comp::Normal<Point<ScalarType, N>, ParentVertexType, true>;
280
281template<typename ScalarType, typename ParentVertexType>
282using OptionalNormal3 = comp::Normal3<ScalarType, ParentVertexType, true>;
283
284template<typename ParentVertexType>
285using OptionalNormal3f = comp::Normal3f<ParentVertexType, true>;
286
287template<typename ParentVertexType>
288using OptionalNormal3d = comp::Normal3d<ParentVertexType, true>;
289
290/* Port ParentMeshPointer class into vert namespace */
291template<typename MeshType>
292using ParentMeshPointer = comp::ParentMeshPointer<MeshType>;
293
294/* Port Position class into vert namespace */
295template<typename ScalarType, int N>
296using Position = comp::Position<Point<ScalarType, N>>;
297
298template<typename ScalarType>
299using Position3 = comp::Position3<ScalarType>;
300
301using Position3f = comp::Position3f<>;
302using Position3d = comp::Position3d<>;
303
304template<typename ScalarType, int N, typename ParentVertexType>
305using VerticalPosition = comp::Position<Point<ScalarType, N>, ParentVertexType>;
306
307template<typename ScalarType, typename ParentVertexType>
308using VerticalPosition3 = comp::Position3<ScalarType, ParentVertexType>;
309
310template<typename ParentVertexType>
311using VerticalPosition3f = comp::Position3f<ParentVertexType>;
312
313template<typename ParentVertexType>
314using VerticalPosition3d = comp::Position3d<ParentVertexType>;
315
316/* Port PrincipalCurvature class into vert namespace */
317template<typename ScalarType>
318using PrincipalCurvature = comp::PrincipalCurvature<ScalarType>;
319
320using PrincipalCurvaturef = comp::PrincipalCurvaturef<>;
321using PrincipalCurvatured = comp::PrincipalCurvatured<>;
322
323template<typename ScalarType, typename ParentVertexType>
324using VerticalPrincipalCurvature =
325 comp::PrincipalCurvature<ScalarType, ParentVertexType>;
326
327template<typename ParentVertexType>
328using VerticalPrincipalCurvaturef = comp::PrincipalCurvaturef<ParentVertexType>;
329template<typename ParentVertexType>
330using VerticalPrincipalCurvatured = comp::PrincipalCurvatured<ParentVertexType>;
331
332template<typename ScalarType, typename ParentVertexType>
333using OptionalPrincipalCurvature =
334 comp::PrincipalCurvature<ScalarType, ParentVertexType, true>;
335
336template<typename ParentVertexType>
337using OptionalPrincipalCurvaturef =
338 comp::PrincipalCurvaturef<ParentVertexType, true>;
339template<typename ParentVertexType>
340using OptionalPrincipalCurvatured =
341 comp::PrincipalCurvatured<ParentVertexType, true>;
342
343/* Port Quality class into vert namespace */
344template<typename QualityType>
345using Quality = comp::Quality<QualityType>;
346
347using Qualityf = comp::Qualityf<>;
348using Qualityd = comp::Qualityd<>;
349
350template<typename QualityType, typename FaceType>
351using VerticalQuality = comp::Quality<QualityType, FaceType>;
352
353template<typename FaceType>
354using VerticalQualityf = comp::Quality<float, FaceType>;
355
356template<typename FaceType>
357using VerticalQualityd = comp::Quality<double, FaceType>;
358
359template<typename QualityType, typename ParentVertexType>
360using OptionalQuality = comp::Quality<QualityType, ParentVertexType, true>;
361
362template<typename ParentVertexType>
363using OptionalQualityf = comp::Quality<float, ParentVertexType, true>;
364
365template<typename ParentVertexType>
366using OptionalQualityd = comp::Quality<double, ParentVertexType, true>;
367
368/* Port TexCoord class into vert namespace */
369template<typename ScalarType>
370using TexCoord = comp::TexCoord<ScalarType>;
371
372using TexCoordf = comp::TexCoordf<>;
373using TexCoordd = comp::TexCoordd<>;
374
375template<typename ScalarType, typename ParentVertexType>
376using VerticalTexCoord = comp::TexCoord<ScalarType, ParentVertexType>;
377
378template<typename ParentVertexType>
379using VerticalTexCoordf = comp::TexCoord<float, ParentVertexType>;
380
381template<typename ParentVertexType>
382using VerticalTexCoordd = comp::TexCoord<double, ParentVertexType>;
383
384template<typename ScalarType, typename ParentVertexType>
385using OptionalTexCoord = comp::TexCoord<ScalarType, ParentVertexType, true>;
386
387template<typename ParentVertexType>
388using OptionalTexCoordf = comp::TexCoord<float, ParentVertexType, true>;
389
390template<typename ParentVertexType>
391using OptionalTexCoordd = comp::TexCoord<double, ParentVertexType, true>;
392
// end of edge_components group
394
395} // namespace vcl::vert
396
397#endif // VCL_MESH_ELEMENTS_VERTEX_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 a Element) has the AdjacentVertices component ...
Definition adjacent_vertices.h:655
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) has the AdjacentVertices component ...
Definition adjacent_vertices.h:669
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) has the PrincipalCurvature componen...
Definition principal_curvature.h:159
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) has the TexCoord component (inherit...
Definition tex_coord.h:145
A concept that checks whether a type T (that should be a Element) has the Position component (inherit...
Definition position.h:127
A concept that checks whether a type T (that should be a Element) has the PrincipalCurvature componen...
Definition principal_curvature.h:145
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 TexCoord component (inherit...
Definition tex_coord.h:132
Definition vertex_components.h:67
Definition vertex_components.h:71
Definition vertex_components.h:75
Definition vertex_components.h:79
Definition vertex_components.h:81
Definition vertex_components.h:85
Definition vertex_components.h:89
Definition vertex_components.h:93
Definition vertex_components.h:69
Definition vertex_components.h:73
Definition vertex_components.h:77
Definition vertex_components.h:83
Definition vertex_components.h:91
Definition vertex_components.h:95
Definition vertex_components.h:99
Definition vertex_components.h:103
Definition vertex_components.h:107
Definition vertex_components.h:87
Definition vertex_components.h:97
Definition vertex_components.h:101
Definition vertex_components.h:105