KrisLibrary  1.0.0
Geodesic.h
1 #ifndef MESHING_GEODESIC_H
2 #define MESHING_GEODESIC_H
3 
4 #include "TriMeshTopology.h"
5 #include <KrisLibrary/structs/FixedSizeHeap.h>
6 
7 namespace Meshing {
8 
16 {
17  public:
19  void ComputeVirtualEdges();
20  void SolveFromVertex(int v);
21  void SolveFromTri(int tri,const Vector3& pt);
22  Real Distance(int tri,const Vector3& pt) const;
23  void ExpandVert(int v);
24  void UpdateDistance(int v,Real d);
25 
26  const TriMeshWithTopology& mesh;
27  vector<Real> triangleWeights; //by default empty means a coefficient of 1
28  vector<Real> vertCosts;
29  vector<int> vertColor;
31  //edges to propagate values to from obtuse triangles to support (along with the unfolded virtual point
32  struct VirtualEdge
33  {
34  int vertex1,vertex2;
35  Vector2 planePos1,planePos2;
36  };
37  vector<VirtualEdge> virtualEdges;
38  //co-edges from support vertices to obtuse triangles
39  vector<vector<int> > incomingVirtualEdges;
40 };
41 
42 } //namespace Meshing
43 
44 #endif
The namespace for all classes/functions in the Meshing package.
Definition: AnyGeometry.h:11
A 3D vector class.
Definition: math3d/primitives.h:136
A triangle mesh that contains connectivity relations between vertices and triangles.
Definition: TriMeshTopology.h:31
Computes an approximate geodesic distance over a mesh, from a single source.
Definition: Geodesic.h:15
A 2D vector class.
Definition: math3d/primitives.h:41