Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
FelkelStraightSkeleton.h
1 //
2 // StraightSkeleton.h: interface for the vtStraightSkeleton class.
3 //
4 // Copyright (c) 2003-2006 Virtual Terrain Project
5 // Free for all uses, see license.txt for details.
6 //
7 // Straight skeleton algorithm and original implementation
8 // courtesy of Petr Felkel and Stepan Obdrzalek (petr.felkel@tiani.com)
9 // Re-implemented for the Virtual Terrain Project (vterrain.org)
10 // by Roger James (www.beardandsandals.co.uk)
11 //
12 
13 #ifndef STRAIGHTSKELETONH
14 #define STRAIGHTSKELETONH
15 
16 #include "FelkelComponents.h"
17 #include "FelkelIntersection.h"
18 
27 {
28 public:
30  virtual ~vtStraightSkeleton();
31 
32  CSkeleton& MakeSkeleton(ContourVector &contours);
33  CSkeleton& MakeSkeleton(Contour &points);
34  CSkeleton CompleteWingedEdgeStructure(ContourVector &contours);
35 #ifdef FELKELDEBUG
36  void Dump();
37 #endif
38 
39  IntersectionQueue m_iq;
40  CVertexList m_vl;
41  CSkeleton m_skeleton;
42  CSkeleton m_boundaryedges;
43  int m_NumberOfBoundaryVertices;
44  int m_NumberOfBoundaryEdges;
45 private:
46  void FixSkeleton(); // Clean up the unlinked skeleton lines caused by non-convex intersections
47 };
48 
49 #endif // STRAIGHTSKELETONH