DGtal 1.4.2
Loading...
Searching...
No Matches
SurfaceMeshHelper.h
1
17#pragma once
18
31#if defined(SurfaceMeshHelper_RECURSES)
32#error Recursive header files inclusion detected in SurfaceMeshHelper.h
33#else // defined(SurfaceMeshHelper_RECURSES)
35#define SurfaceMeshHelper_RECURSES
36
37#if !defined SurfaceMeshHelper_h
39#define SurfaceMeshHelper_h
40
42// Inclusions
43#include <iostream>
44#include <sstream>
45#include <string>
46#include "DGtal/base/Common.h"
47#include "DGtal/helpers/StdDefs.h"
48#include "DGtal/shapes/SurfaceMesh.h"
49
50namespace DGtal
51{
52
54 // template class SurfaceMeshHelper
62 template < typename TRealPoint, typename TRealVector >
64 {
65 typedef TRealPoint RealPoint;
66 typedef TRealVector RealVector;
70
72 typedef typename RealVector::Component Scalar;
73 typedef std::vector<Scalar> Scalars;
74 typedef std::vector<RealVector> RealVectors;
75 typedef typename SurfaceMesh::Size Size;
76 typedef typename SurfaceMesh::Index Index;
78 typedef typename SurfaceMesh::Faces Faces;
79
84
85 //---------------------------------------------------------------------------
86 public:
89
104 static
106 makeSphere( const Scalar radius, const RealPoint &center,
107 Size m, Size n, NormalsType normals );
108
118 static
119 Scalars
120 sphereMeanCurvatures( const Scalar radius, Size m, Size n );
121
131 static
132 Scalars
134
144 static
145 Scalars
147
157 static
158 Scalars
160
171 static
174
185 static
188
190
191 //---------------------------------------------------------------------------
192 public:
195
210 static
212 makeLantern( const Scalar radius, const Scalar height, const RealPoint& center,
213 Size m, Size n, const NormalsType normals );
214
224 static
225 Scalars
226 lanternMeanCurvatures( const Scalar radius, Size m, Size n );
227
237 static
238 Scalars
240
250 static
251 Scalars
253
263 static
264 Scalars
266
276 static
279
289 static
292
294
295 //---------------------------------------------------------------------------
296 public:
299
318 static
320 makeTorus( const Scalar big_radius, const Scalar small_radius, const RealPoint& center,
321 Size m, Size n, const int twist, const NormalsType normals );
322
337 static
338 Scalars
339 torusMeanCurvatures( const Scalar big_radius, const Scalar small_radius,
340 Size m, Size n, const int twist );
341
356 static
357 Scalars
358 torusGaussianCurvatures( const Scalar big_radius, const Scalar small_radius,
359 Size m, Size n, const int twist );
360
375 static
376 Scalars
377 torusFirstPrincipalCurvatures( const Scalar big_radius, const Scalar small_radius,
378 Size m, Size n, const int twist );
379
394 static
395 Scalars
396 torusSecondPrincipalCurvatures( const Scalar big_radius, const Scalar small_radius,
397 Size m, Size n, const int twist );
398
413 static
415 torusFirstPrincipalDirections( const Scalar big_radius, const Scalar small_radius,
416 Size m, Size n, const int twist );
417
433 static
435 torusSecondPrincipalDirections( const Scalar big_radius, const Scalar small_radius,
436 Size m, Size n, const int twist );
437
439
440 };
441
442} // namespace DGtal
443
445// Includes inline functions.
446#include "SurfaceMeshHelper.ih"
447// //
449
450#endif // !defined SurfaceMeshHelper_h
451
452#undef SurfaceMeshHelper_RECURSES
453#endif // else defined(SurfaceMeshHelper_RECURSES)
static const Dimension dimension
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::uint32_t Dimension
Definition Common.h:136
Aim: An helper class for building classical meshes.
static Scalars torusSecondPrincipalCurvatures(const Scalar big_radius, const Scalar small_radius, Size m, Size n, const int twist)
DGtal::SurfaceMesh< RealPoint, RealVector > SurfaceMesh
static Scalars sphereMeanCurvatures(const Scalar radius, Size m, Size n)
static Scalars sphereGaussianCurvatures(const Scalar radius, Size m, Size n)
static RealVectors sphereSecondPrincipalDirections(const Scalar radius, Size m, Size n)
RealVector::Component Scalar
static Scalars torusMeanCurvatures(const Scalar big_radius, const Scalar small_radius, Size m, Size n, const int twist)
static Scalars lanternMeanCurvatures(const Scalar radius, Size m, Size n)
SurfaceMeshHelper< RealPoint, RealVector > Self
BOOST_STATIC_ASSERT((dimension==3))
static Scalars lanternGaussianCurvatures(const Scalar radius, Size m, Size n)
static Scalars lanternFirstPrincipalCurvatures(const Scalar radius, Size m, Size n)
std::vector< Scalar > Scalars
static RealVectors lanternFirstPrincipalDirections(const Scalar radius, Size m, Size n)
static Scalars sphereSecondPrincipalCurvatures(const Scalar radius, Size m, Size n)
static RealVectors sphereFirstPrincipalDirections(const Scalar radius, Size m, Size n)
static const Dimension dimension
static Scalars torusFirstPrincipalCurvatures(const Scalar big_radius, const Scalar small_radius, Size m, Size n, const int twist)
static RealVectors torusSecondPrincipalDirections(const Scalar big_radius, const Scalar small_radius, Size m, Size n, const int twist)
static Scalars sphereFirstPrincipalCurvatures(const Scalar radius, Size m, Size n)
static SurfaceMesh makeSphere(const Scalar radius, const RealPoint &center, Size m, Size n, NormalsType normals)
std::vector< RealVector > RealVectors
static SurfaceMesh makeTorus(const Scalar big_radius, const Scalar small_radius, const RealPoint &center, Size m, Size n, const int twist, const NormalsType normals)
static SurfaceMesh makeLantern(const Scalar radius, const Scalar height, const RealPoint &center, Size m, Size n, const NormalsType normals)
SurfaceMesh::Vertices Vertices
static RealVectors torusFirstPrincipalDirections(const Scalar big_radius, const Scalar small_radius, Size m, Size n, const int twist)
static Scalars lanternSecondPrincipalCurvatures(const Scalar radius, Size m, Size n)
static Scalars torusGaussianCurvatures(const Scalar big_radius, const Scalar small_radius, Size m, Size n, const int twist)
static RealVectors lanternSecondPrincipalDirections(const Scalar radius, Size m, Size n)
Aim: Represents an embedded mesh as faces and a list of vertices. Vertices may be shared among faces ...
Definition SurfaceMesh.h:92
std::vector< Vertex > Vertices
The type that defines a list/range of vertices (e.g. to define faces)
std::vector< Face > Faces
std::size_t Size
The type for counting elements.
std::size_t Index
The type used for numbering vertices and faces.