Free Electron
Geodesic.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __geometry_Geodesic_h__
8 #define __geometry_Geodesic_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief calculate surface distance between points
17 
18  @ingroup geometry
19 
20 *//***************************************************************************/
21 class FE_DL_EXPORT Geodesic
22 {
23  public:
24  class FE_DL_EXPORT Mesh: public Counted
25  {
26  public:
27 
28  Mesh(void);
29  virtual ~Mesh(void);
30 
31  void populate(Array<F64>& a_rPoints,Array<U32>& a_rFaces);
32  void* rawMesh(void);
33 
34  private:
35  void clear(void);
36 
37  void* m_pMesh;
38  };
39 
40  Geodesic(void);
41  ~Geodesic(void);
42 
43  sp<Mesh> createMesh(Array<F64>& a_rPoints,Array<U32>& a_rFaces);
44 
45  void setMesh(sp<Mesh> a_spMesh);
46  sp<Mesh> mesh(void);
47 
48  void setSource(I32 a_sourceFaceIndex,
49  SpatialVector a_sourcePosition);
50  void setMaxDistance(Real a_maxDistance);
51 
52  Real distanceTo(I32 a_targetFaceIndex,
53  SpatialVector a_targetPosition);
54 
55  private:
56 
57  void clear(void);
58 
59  sp<Mesh> m_spMesh;
60  void* m_pAlgorithm;
61 
62  I32 m_sourceFaceIndex;
63  SpatialVector m_sourcePosition;
64  Real m_maxDistance;
65 };
66 
67 } /* namespace ext */
68 } /* namespace fe */
69 
70 #endif /* __geometry_Geodesic_h__ */
71 
Heap-based support for classes participating in fe::ptr <>
Definition: Counted.h:35
kernel
Definition: namespace.dox:3
Wrapper for std::vector.
Definition: Array.h:21
calculate surface distance between points
Definition: Geodesic.h:21