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/material_index.h"
34#include "../components/normal.h"
35#include "../components/parent_mesh_pointer.h"
36#include "../components/position.h"
37#include "../components/principal_curvature.h"
38#include "../components/quality.h"
39#include "../components/tangent.h"
40#include "../components/tex_coord.h"
41
60namespace vcl::vert {
61
67/* Port concepts into the vert namespace */
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>
108template<typename T>
110template<typename T>
112template<typename T>
114template<typename T>
116template<typename T>
118
// end of group
120
126/* Port AdjacentEdges class into vert namespace */
127template<bool INDEXED, typename EdgeType, typename ParentVertexType>
128using AdjacentEdges =
129 comp::AdjacentEdges<INDEXED, EdgeType, -1, false, ParentVertexType>;
130
131template<bool INDEXED, typename EdgeType, typename ParentVertexType>
132using VerticalAdjacentEdges =
133 comp::AdjacentEdges<INDEXED, EdgeType, -1, false, ParentVertexType, true>;
134
135template<bool INDEXED, typename EdgeType, typename ParentVertexType>
136using OptionalAdjacentEdges = comp::
137 AdjacentEdges<INDEXED, EdgeType, -1, false, ParentVertexType, true, true>;
138
139template<typename EdgeType, typename ParentVertexType>
140using AdjacentEdgeIndices =
141 comp::AdjacentEdges<true, EdgeType, -1, false, ParentVertexType>;
142
143template<typename EdgeType, typename ParentVertexType>
144using VerticalAdjacentEdgeIndices =
145 comp::AdjacentEdges<true, EdgeType, -1, false, ParentVertexType, true>;
146
147template<typename EdgeType, typename ParentVertexType>
148using OptionalAdjacentEdgeIndices = comp::
149 AdjacentEdges<true, EdgeType, -1, false, ParentVertexType, true, true>;
150
151template<typename EdgeType, typename ParentVertexType>
152using AdjacentEdgePointers =
153 comp::AdjacentEdges<false, EdgeType, -1, false, ParentVertexType>;
154
155template<typename EdgeType, typename ParentVertexType>
156using VerticalAdjacentEdgePointers =
157 comp::AdjacentEdges<false, EdgeType, -1, false, ParentVertexType, true>;
158
159template<typename EdgeType, typename ParentVertexType>
160using OptionalAdjacentEdgePointers = comp::
161 AdjacentEdges<false, EdgeType, -1, false, ParentVertexType, true, true>;
162
163/* Port AdjacentFaces class into vert namespace */
164template<bool INDEXED, typename FaceType, typename ParentVertexType>
165using AdjacentFaces =
166 comp::AdjacentFaces<INDEXED, FaceType, -1, false, ParentVertexType>;
167
168template<bool INDEXED, typename FaceType, typename ParentVertexType>
169using VerticalAdjacentFaces =
170 comp::AdjacentFaces<INDEXED, FaceType, -1, false, ParentVertexType, true>;
171
172template<bool INDEXED, typename FaceType, typename ParentVertexType>
173using OptionalAdjacentFaces = comp::
174 AdjacentFaces<INDEXED, FaceType, -1, false, ParentVertexType, true, true>;
175
176template<typename FaceType, typename ParentVertexType>
177using AdjacentFaceIndices =
178 comp::AdjacentFaces<true, FaceType, -1, false, ParentVertexType>;
179
180template<typename FaceType, typename ParentVertexType>
181using VerticalAdjacentFaceIndices =
182 comp::AdjacentFaces<true, FaceType, -1, false, ParentVertexType, true>;
183
184template<typename FaceType, typename ParentVertexType>
185using OptionalAdjacentFaceIndices = comp::
186 AdjacentFaces<true, FaceType, -1, false, ParentVertexType, true, true>;
187
188template<typename FaceType, typename ParentVertexType>
189using AdjacentFacePointers =
190 comp::AdjacentFaces<false, FaceType, -1, false, ParentVertexType>;
191
192template<typename FaceType, typename ParentVertexType>
193using VerticalAdjacentFacePointers =
194 comp::AdjacentFaces<false, FaceType, -1, false, ParentVertexType, true>;
195
196template<typename FaceType, typename ParentVertexType>
197using OptionalAdjacentFacePointers = comp::
198 AdjacentFaces<false, FaceType, -1, false, ParentVertexType, true, true>;
199
200/* Port AdjacentVertices class into vert namespace */
201template<bool INDEXED, typename ParentVertexType>
202using AdjacentVertices =
203 comp::AdjacentVertices<INDEXED, ParentVertexType, ParentVertexType>;
204
205template<bool INDEXED, typename ParentVertexType>
206using VerticalAdjacentVertices =
207 comp::AdjacentVertices<INDEXED, ParentVertexType, ParentVertexType, true>;
208
209template<bool INDEXED, typename ParentVertexType>
210using OptionalAdjacentVertices = comp::
211 AdjacentVertices<INDEXED, ParentVertexType, ParentVertexType, true, true>;
212
213template<typename ParentVertexType>
214using AdjacentVertexIndices =
215 comp::AdjacentVertices<true, ParentVertexType, ParentVertexType>;
216
217template<typename ParentVertexType>
218using VerticalAdjacentVertexIndices =
219 comp::AdjacentVertices<true, ParentVertexType, ParentVertexType, true>;
220
221template<typename ParentVertexType>
222using OptionalAdjacentVertexIndices = comp::
223 AdjacentVertices<true, ParentVertexType, ParentVertexType, true, true>;
224
225template<typename ParentVertexType>
226using AdjacentVertexPointers =
227 comp::AdjacentVertices<false, ParentVertexType, ParentVertexType>;
228
229template<typename ParentVertexType>
230using VerticalAdjacentVertexPointers =
231 comp::AdjacentVertices<false, ParentVertexType, ParentVertexType, true>;
232
233template<typename ParentVertexType>
234using OptionalAdjacentVertexPointers = comp::
235 AdjacentVertices<false, ParentVertexType, ParentVertexType, true, true>;
236
237/* Port BitFlags class into vert namespace */
238using BitFlags = comp::BitFlags<>;
239
240template<typename ParentVertexType>
241using VerticalBitFlags = comp::BitFlags<ParentVertexType>;
242
243/* Port Color class into vert namespace */
244using Color = comp::Color<>;
245
246template<typename ParentVertexType>
247using VerticalColor = comp::Color<ParentVertexType>;
248
249template<typename ParentVertexType>
250using OptionalColor = comp::Color<ParentVertexType, true>;
251
252/* Port CustomComponents class into vert namespace */
253template<typename ParentVertexType>
254using CustomComponents = comp::CustomComponents<ParentVertexType>;
255
256/* Port Mark class into vert namespace */
257using Mark = comp::Mark<>;
258
259template<typename ParentVertexType>
260using VerticalMark = comp::Mark<ParentVertexType>;
261
262template<typename ParentVertexType>
263using OptionalMark = comp::Mark<ParentVertexType, true>;
264
265/* Port MaterialIndex class into vert namespace */
266using MaterialIndex = comp::MaterialIndex<>;
267
268template<typename ParentVertexType>
269using VerticalMaterialIndex = comp::MaterialIndex<ParentVertexType>;
270
271template<typename ParentVertexType>
272using OptionalMaterialIndex = comp::MaterialIndex<ParentVertexType, true>;
273
274/* Port Normal classes into vert namespace */
275template<typename ScalarType, int N>
276using Normal = comp::Normal<Point<ScalarType, N>>;
277
278template<typename ScalarType>
279using Normal3 = comp::Normal3<ScalarType>;
280
281using Normal3f = comp::Normal3f<>;
282using Normal3d = comp::Normal3d<>;
283
284template<typename ScalarType, int N, typename ParentVertexType>
285using VerticalNormal = comp::Normal<Point<ScalarType, N>, ParentVertexType>;
286
287template<typename ScalarType, typename ParentVertexType>
288using VerticalNormal3 = comp::Normal3<ScalarType, ParentVertexType>;
289
290template<typename ParentVertexType>
291using VerticalNormal3f = comp::Normal3f<ParentVertexType>;
292
293template<typename ParentVertexType>
294using VerticalNormal3d = comp::Normal3d<ParentVertexType>;
295
296template<typename ScalarType, int N, typename ParentVertexType>
297using OptionalNormal =
298 comp::Normal<Point<ScalarType, N>, ParentVertexType, true>;
299
300template<typename ScalarType, typename ParentVertexType>
301using OptionalNormal3 = comp::Normal3<ScalarType, ParentVertexType, true>;
302
303template<typename ParentVertexType>
304using OptionalNormal3f = comp::Normal3f<ParentVertexType, true>;
305
306template<typename ParentVertexType>
307using OptionalNormal3d = comp::Normal3d<ParentVertexType, true>;
308
309/* Port ParentMeshPointer class into vert namespace */
310template<typename MeshType>
311using ParentMeshPointer = comp::ParentMeshPointer<MeshType>;
312
313/* Port Position class into vert namespace */
314template<typename ScalarType, int N>
315using Position = comp::Position<Point<ScalarType, N>>;
316
317template<typename ScalarType>
318using Position3 = comp::Position3<ScalarType>;
319
320using Position3f = comp::Position3f<>;
321using Position3d = comp::Position3d<>;
322
323template<typename ScalarType, int N, typename ParentVertexType>
324using VerticalPosition = comp::Position<Point<ScalarType, N>, ParentVertexType>;
325
326template<typename ScalarType, typename ParentVertexType>
327using VerticalPosition3 = comp::Position3<ScalarType, ParentVertexType>;
328
329template<typename ParentVertexType>
330using VerticalPosition3f = comp::Position3f<ParentVertexType>;
331
332template<typename ParentVertexType>
333using VerticalPosition3d = comp::Position3d<ParentVertexType>;
334
335/* Port PrincipalCurvature class into vert namespace */
336template<typename ScalarType>
337using PrincipalCurvature = comp::PrincipalCurvature<ScalarType>;
338
339using PrincipalCurvaturef = comp::PrincipalCurvaturef<>;
340using PrincipalCurvatured = comp::PrincipalCurvatured<>;
341
342template<typename ScalarType, typename ParentVertexType>
343using VerticalPrincipalCurvature =
344 comp::PrincipalCurvature<ScalarType, ParentVertexType>;
345
346template<typename ParentVertexType>
347using VerticalPrincipalCurvaturef = comp::PrincipalCurvaturef<ParentVertexType>;
348template<typename ParentVertexType>
349using VerticalPrincipalCurvatured = comp::PrincipalCurvatured<ParentVertexType>;
350
351template<typename ScalarType, typename ParentVertexType>
352using OptionalPrincipalCurvature =
353 comp::PrincipalCurvature<ScalarType, ParentVertexType, true>;
354
355template<typename ParentVertexType>
356using OptionalPrincipalCurvaturef =
357 comp::PrincipalCurvaturef<ParentVertexType, true>;
358template<typename ParentVertexType>
359using OptionalPrincipalCurvatured =
360 comp::PrincipalCurvatured<ParentVertexType, true>;
361
362/* Port Quality class into vert namespace */
363template<typename QualityType>
364using Quality = comp::Quality<QualityType>;
365
366using Qualityf = comp::Qualityf<>;
367using Qualityd = comp::Qualityd<>;
368
369template<typename QualityType, typename FaceType>
370using VerticalQuality = comp::Quality<QualityType, FaceType>;
371
372template<typename FaceType>
373using VerticalQualityf = comp::Quality<float, FaceType>;
374
375template<typename FaceType>
376using VerticalQualityd = comp::Quality<double, FaceType>;
377
378template<typename QualityType, typename ParentVertexType>
379using OptionalQuality = comp::Quality<QualityType, ParentVertexType, true>;
380
381template<typename ParentVertexType>
382using OptionalQualityf = comp::Quality<float, ParentVertexType, true>;
383
384template<typename ParentVertexType>
385using OptionalQualityd = comp::Quality<double, ParentVertexType, true>;
386
387/* Port Tangent classes into vert namespace */
388template<typename ScalarType, int N>
389using Tangent = comp::Tangent<Point<ScalarType, N>>;
390
391template<typename ScalarType>
392using Tangent3 = comp::Tangent3<ScalarType>;
393
394using Tangent3f = comp::Tangent3f<>;
395using Tangent3d = comp::Tangent3d<>;
396
397template<typename ScalarType, int N, typename ParentVertexType>
398using VerticalTangent = comp::Tangent<Point<ScalarType, N>, ParentVertexType>;
399
400template<typename ScalarType, typename ParentVertexType>
401using VerticalTangent3 = comp::Tangent3<ScalarType, ParentVertexType>;
402
403template<typename ParentVertexType>
404using VerticalTangent3f = comp::Tangent3f<ParentVertexType>;
405
406template<typename ParentVertexType>
407using VerticalTangent3d = comp::Tangent3d<ParentVertexType>;
408
409template<typename ScalarType, int N, typename ParentVertexType>
410using OptionalTangent =
411 comp::Tangent<Point<ScalarType, N>, ParentVertexType, true>;
412
413template<typename ScalarType, typename ParentVertexType>
414using OptionalTangent3 = comp::Tangent3<ScalarType, ParentVertexType, true>;
415
416template<typename ParentVertexType>
417using OptionalTangent3f = comp::Tangent3f<ParentVertexType, true>;
418
419template<typename ParentVertexType>
420using OptionalTangent3d = comp::Tangent3d<ParentVertexType, true>;
421
422/* Port TexCoord class into vert namespace */
423template<typename ScalarType>
424using TexCoord = comp::TexCoord<ScalarType>;
425
426using TexCoordf = comp::TexCoordf<>;
427using TexCoordd = comp::TexCoordd<>;
428
429template<typename ScalarType, typename ParentVertexType>
430using VerticalTexCoord = comp::TexCoord<ScalarType, ParentVertexType>;
431
432template<typename ParentVertexType>
433using VerticalTexCoordf = comp::TexCoord<float, ParentVertexType>;
434
435template<typename ParentVertexType>
436using VerticalTexCoordd = comp::TexCoord<double, ParentVertexType>;
437
438template<typename ScalarType, typename ParentVertexType>
439using OptionalTexCoord = comp::TexCoord<ScalarType, ParentVertexType, true>;
440
441template<typename ParentVertexType>
442using OptionalTexCoordf = comp::TexCoord<float, ParentVertexType, true>;
443
444template<typename ParentVertexType>
445using OptionalTexCoordd = comp::TexCoord<double, ParentVertexType, true>;
446
// end of vert_components group
448
449} // namespace vcl::vert
450
451#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 or a Mesh) has the MaterialIndex com...
Definition material_index.h:142
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 or a Mesh) has the MaterialIndex com...
Definition material_index.h:155
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 Tangent component (inherits...
Definition tangent.h:223
A concept that checks whether a type T (that should be a Element) has the TexCoord component (inherit...
Definition tex_coord.h:144
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 Tangent component (inherits...
Definition tangent.h:210
A concept that checks whether a type T (that should be a Element) has the TexCoord component (inherit...
Definition tex_coord.h:131
Definition vertex_components.h:69
Definition vertex_components.h:73
Definition vertex_components.h:77
Definition vertex_components.h:81
Definition vertex_components.h:83
Definition vertex_components.h:87
Definition vertex_components.h:91
Definition vertex_components.h:95
Definition vertex_components.h:99
Definition vertex_components.h:71
Definition vertex_components.h:75
Definition vertex_components.h:79
Definition vertex_components.h:85
Definition vertex_components.h:93
Definition vertex_components.h:97
Definition vertex_components.h:101
Definition vertex_components.h:105
Definition vertex_components.h:109
Definition vertex_components.h:113
Definition vertex_components.h:117
Definition vertex_components.h:89
Definition vertex_components.h:103
Definition vertex_components.h:107
Definition vertex_components.h:111
Definition vertex_components.h:115