Visual Computing Library
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/coordinate.h"
32#include "../components/custom_components.h"
33#include "../components/mark.h"
34#include "../components/normal.h"
35#include "../components/parent_mesh_pointer.h"
36#include "../components/principal_curvature.h"
37#include "../components/quality.h"
38#include "../components/tex_coord.h"
39
50namespace vcl::vert {
51
57/* Port AdjacentEdges class into vert namespace */
58template<bool INDEXED, typename EdgeType, typename ParentVertexType>
59using AdjacentEdges =
60 comp::AdjacentEdges<INDEXED, EdgeType, -1, false, ParentVertexType>;
61
62template<bool INDEXED, typename EdgeType, typename ParentVertexType>
63using VerticalAdjacentEdges =
64 comp::AdjacentEdges<INDEXED, EdgeType, -1, false, ParentVertexType, true>;
65
66template<bool INDEXED, typename EdgeType, typename ParentVertexType>
67using OptionalAdjacentEdges = comp::
68 AdjacentEdges<INDEXED, EdgeType, -1, false, ParentVertexType, true, true>;
69
70template<typename EdgeType, typename ParentVertexType>
71using AdjacentEdgeIndices =
72 comp::AdjacentEdges<true, EdgeType, -1, false, ParentVertexType>;
73
74template<typename EdgeType, typename ParentVertexType>
75using VerticalAdjacentEdgeIndices =
76 comp::AdjacentEdges<true, EdgeType, -1, false, ParentVertexType, true>;
77
78template<typename EdgeType, typename ParentVertexType>
79using OptionalAdjacentEdgeIndices = comp::
80 AdjacentEdges<true, EdgeType, -1, false, ParentVertexType, true, true>;
81
82template<typename EdgeType, typename ParentVertexType>
83using AdjacentEdgePointers =
84 comp::AdjacentEdges<false, EdgeType, -1, false, ParentVertexType>;
85
86template<typename EdgeType, typename ParentVertexType>
87using VerticalAdjacentEdgePointers =
88 comp::AdjacentEdges<false, EdgeType, -1, false, ParentVertexType, true>;
89
90template<typename EdgeType, typename ParentVertexType>
91using OptionalAdjacentEdgePointers = comp::
92 AdjacentEdges<false, EdgeType, -1, false, ParentVertexType, true, true>;
93
94/* Port AdjacentFaces class into vert namespace */
95template<bool INDEXED, typename FaceType, typename ParentVertexType>
96using AdjacentFaces =
97 comp::AdjacentFaces<INDEXED, FaceType, -1, false, ParentVertexType>;
98
99template<bool INDEXED, typename FaceType, typename ParentVertexType>
100using VerticalAdjacentFaces =
101 comp::AdjacentFaces<INDEXED, FaceType, -1, false, ParentVertexType, true>;
102
103template<bool INDEXED, typename FaceType, typename ParentVertexType>
104using OptionalAdjacentFaces = comp::
105 AdjacentFaces<INDEXED, FaceType, -1, false, ParentVertexType, true, true>;
106
107template<typename FaceType, typename ParentVertexType>
108using AdjacentFaceIndices =
109 comp::AdjacentFaces<true, FaceType, -1, false, ParentVertexType>;
110
111template<typename FaceType, typename ParentVertexType>
112using VerticalAdjacentFaceIndices =
113 comp::AdjacentFaces<true, FaceType, -1, false, ParentVertexType, true>;
114
115template<typename FaceType, typename ParentVertexType>
116using OptionalAdjacentFaceIndices = comp::
117 AdjacentFaces<true, FaceType, -1, false, ParentVertexType, true, true>;
118
119template<typename FaceType, typename ParentVertexType>
120using AdjacentFacePointers =
121 comp::AdjacentFaces<false, FaceType, -1, false, ParentVertexType>;
122
123template<typename FaceType, typename ParentVertexType>
124using VerticalAdjacentFacePointers =
125 comp::AdjacentFaces<false, FaceType, -1, false, ParentVertexType, true>;
126
127template<typename FaceType, typename ParentVertexType>
128using OptionalAdjacentFacePointers = comp::
129 AdjacentFaces<false, FaceType, -1, false, ParentVertexType, true, true>;
130
131/* Port AdjacentVertices class into vert namespace */
132template<bool INDEXED, typename ParentVertexType>
133using AdjacentVertices =
134 comp::AdjacentVertices<INDEXED, ParentVertexType, ParentVertexType>;
135
136template<bool INDEXED, typename ParentVertexType>
137using VerticalAdjacentVertices =
138 comp::AdjacentVertices<INDEXED, ParentVertexType, ParentVertexType, true>;
139
140template<bool INDEXED, typename ParentVertexType>
141using OptionalAdjacentVertices = comp::
142 AdjacentVertices<INDEXED, ParentVertexType, ParentVertexType, true, true>;
143
144template<typename ParentVertexType>
145using AdjacentVertexIndices =
146 comp::AdjacentVertices<true, ParentVertexType, ParentVertexType>;
147
148template<typename ParentVertexType>
149using VerticalAdjacentVertexIndices =
150 comp::AdjacentVertices<true, ParentVertexType, ParentVertexType, true>;
151
152template<typename ParentVertexType>
153using OptionalAdjacentVertexIndices = comp::
154 AdjacentVertices<true, ParentVertexType, ParentVertexType, true, true>;
155
156template<typename ParentVertexType>
157using AdjacentVertexPointers =
158 comp::AdjacentVertices<false, ParentVertexType, ParentVertexType>;
159
160template<typename ParentVertexType>
161using VerticalAdjacentVertexPointers =
162 comp::AdjacentVertices<false, ParentVertexType, ParentVertexType, true>;
163
164template<typename ParentVertexType>
165using OptionalAdjacentVertexPointers = comp::
166 AdjacentVertices<false, ParentVertexType, ParentVertexType, true, true>;
167
168/* Port BitFlags class into vert namespace */
169using BitFlags = comp::BitFlags<>;
170
171template<typename ParentVertexType>
172using VerticalBitFlags = comp::BitFlags<ParentVertexType>;
173
174/* Port Color class into vert namespace */
175using Color = comp::Color<>;
176
177template<typename ParentVertexType>
178using VerticalColor = comp::Color<ParentVertexType>;
179
180template<typename ParentVertexType>
181using OptionalColor = comp::Color<ParentVertexType, true>;
182
183/* Port Coordinate class into vert namespace */
184template<typename ScalarType, int N>
185using Coordinate = comp::Coordinate<Point<ScalarType, N>>;
186
187template<typename ScalarType>
188using Coordinate3 = comp::Coordinate3<ScalarType>;
189
190using Coordinate3f = comp::Coordinate3f<>;
191using Coordinate3d = comp::Coordinate3d<>;
192
193template<typename ScalarType, int N, typename ParentVertexType>
194using VerticalCoordinate =
195 comp::Coordinate<Point<ScalarType, N>, ParentVertexType>;
196
197template<typename ScalarType, typename ParentVertexType>
198using VerticalCoordinate3 = comp::Coordinate3<ScalarType, ParentVertexType>;
199
200template<typename ParentVertexType>
201using VerticalCoordinate3f = comp::Coordinate3f<ParentVertexType>;
202
203template<typename ParentVertexType>
204using VerticalCoordinate3d = comp::Coordinate3d<ParentVertexType>;
205
206/* Port CustomComponents class into vert namespace */
207template<typename ParentVertexType>
208using CustomComponents = comp::CustomComponents<ParentVertexType>;
209
210/* Port Mark class into vert namespace */
211using Mark = comp::Mark<>;
212
213template<typename ParentVertexType>
214using VerticalMark = comp::Mark<ParentVertexType>;
215
216template<typename ParentVertexType>
217using OptionalMark = comp::Mark<ParentVertexType, true>;
218
219/* Port Normal classes into vert namespace */
220template<typename ScalarType, int N>
221using Normal = comp::Normal<Point<ScalarType, N>>;
222
223template<typename ScalarType>
224using Normal3 = comp::Normal3<ScalarType>;
225
226using Normal3f = comp::Normal3f<>;
227using Normal3d = comp::Normal3d<>;
228
229template<typename ScalarType, int N, typename ParentVertexType>
230using VerticalNormal = comp::Normal<Point<ScalarType, N>, ParentVertexType>;
231
232template<typename ScalarType, typename ParentVertexType>
233using VerticalNormal3 = comp::Normal3<ScalarType, ParentVertexType>;
234
235template<typename ParentVertexType>
236using VerticalNormal3f = comp::Normal3f<ParentVertexType>;
237
238template<typename ParentVertexType>
239using VerticalNormal3d = comp::Normal3d<ParentVertexType>;
240
241template<typename ScalarType, int N, typename ParentVertexType>
242using OptionalNormal =
243 comp::Normal<Point<ScalarType, N>, ParentVertexType, true>;
244
245template<typename ScalarType, typename ParentVertexType>
246using OptionalNormal3 = comp::Normal3<ScalarType, ParentVertexType, true>;
247
248template<typename ParentVertexType>
249using OptionalNormal3f = comp::Normal3f<ParentVertexType, true>;
250
251template<typename ParentVertexType>
252using OptionalNormal3d = comp::Normal3d<ParentVertexType, true>;
253
254/* Port ParentMeshPointer class into vert namespace */
255template<typename MeshType>
256using ParentMeshPointer = comp::ParentMeshPointer<MeshType>;
257
258/* Port PrincipalCurvature class into vert namespace */
259template<typename ScalarType>
260using PrincipalCurvature = comp::PrincipalCurvature<ScalarType>;
261
262using PrincipalCurvaturef = comp::PrincipalCurvaturef<>;
263using PrincipalCurvatured = comp::PrincipalCurvatured<>;
264
265template<typename ScalarType, typename ParentVertexType>
266using VerticalPrincipalCurvature =
267 comp::PrincipalCurvature<ScalarType, ParentVertexType>;
268
269template<typename ParentVertexType>
270using VerticalPrincipalCurvaturef = comp::PrincipalCurvaturef<ParentVertexType>;
271template<typename ParentVertexType>
272using VerticalPrincipalCurvatured = comp::PrincipalCurvatured<ParentVertexType>;
273
274template<typename ScalarType, typename ParentVertexType>
275using OptionalPrincipalCurvature =
276 comp::PrincipalCurvature<ScalarType, ParentVertexType, true>;
277
278template<typename ParentVertexType>
279using OptionalPrincipalCurvaturef =
280 comp::PrincipalCurvaturef<ParentVertexType, true>;
281template<typename ParentVertexType>
282using OptionalPrincipalCurvatured =
283 comp::PrincipalCurvatured<ParentVertexType, true>;
284
285/* Port Quality class into vert namespace */
286template<typename QualityType>
287using Quality = comp::Quality<QualityType>;
288
289using Qualityf = comp::Qualityf<>;
290using Qualityd = comp::Qualityd<>;
291
292template<typename QualityType, typename FaceType>
293using VerticalQuality = comp::Quality<QualityType, FaceType>;
294
295template<typename FaceType>
296using VerticalQualityf = comp::Quality<float, FaceType>;
297
298template<typename FaceType>
299using VerticalQualityd = comp::Quality<double, FaceType>;
300
301template<typename QualityType, typename ParentVertexType>
302using OptionalQuality = comp::Quality<QualityType, ParentVertexType, true>;
303
304template<typename ParentVertexType>
305using OptionalQualityf = comp::Quality<float, ParentVertexType, true>;
306
307template<typename ParentVertexType>
308using OptionalQualityd = comp::Quality<double, ParentVertexType, true>;
309
310/* Port TexCoord class into vert namespace */
311template<typename ScalarType>
312using TexCoord = comp::TexCoord<ScalarType>;
313
314using TexCoordf = comp::TexCoordf<>;
315using TexCoordd = comp::TexCoordd<>;
316
317template<typename ScalarType, typename ParentVertexType>
318using VerticalTexCoord = comp::TexCoord<ScalarType, ParentVertexType>;
319
320template<typename ParentVertexType>
321using VerticalTexCoordf = comp::TexCoord<float, ParentVertexType>;
322
323template<typename ParentVertexType>
324using VerticalTexCoordd = comp::TexCoord<double, ParentVertexType>;
325
326template<typename ScalarType, typename ParentVertexType>
327using OptionalTexCoord = comp::TexCoord<ScalarType, ParentVertexType, true>;
328
329template<typename ParentVertexType>
330using OptionalTexCoordf = comp::TexCoord<float, ParentVertexType, true>;
331
332template<typename ParentVertexType>
333using OptionalTexCoordd = comp::TexCoord<double, ParentVertexType, true>;
334
// end of edge_components group
336
337} // namespace vcl::vert
338
339#endif // VCL_MESH_ELEMENTS_VERTEX_COMPONENTS_H
Normal< Point3< Scalar >, ElementType, OPT > Normal3
The Normal3 class is an alias of the Normal component that uses 3 dimensional Points.
Definition normal.h:156
TexCoord< float, ElementType, OPT > TexCoordf
Definition tex_coord.h:154
Coordinate3< double, ElementType, OPT > Coordinate3d
The Coordinate3d class is an alias of the Coordinate component that uses 3 dimensional Points with do...
Definition coordinate.h:183
PrincipalCurvature< float, ElementType, OPT > PrincipalCurvaturef
Definition principal_curvature.h:167
TexCoord< double, ElementType, OPT > TexCoordd
Definition tex_coord.h:169
Coordinate3< float, ElementType, OPT > Coordinate3f
The Coordinate3f class is an alias of the Coordinate component that uses 3 dimensional Points with fl...
Definition coordinate.h:168
Coordinate< Point3< Scalar >, ElementType, OPT > Coordinate3
The Coordinate3 class is an alias of the Coordinate component that uses 3 dimensional Points.
Definition coordinate.h:153
Normal3< double, ElementType, OPT > Normal3d
The Normal3d class is an alias of the Normal component that uses 3 dimensional Points with double pre...
Definition normal.h:186
Quality< float, ElementType, OPT > Qualityf
Definition quality.h:153
PrincipalCurvature< double, ElementType, OPT > PrincipalCurvatured
Definition principal_curvature.h:182
Normal3< float, ElementType, OPT > Normal3f
The Normal3f class is an alias of the Normal component that uses 3 dimensional Points with float prec...
Definition normal.h:171
Quality< double, ElementType, OPT > Qualityd
Definition quality.h:168