#ifndef __STRIPPER_H__ #define __STRIPPER_H__ #include #include #include #include #include #include #include "PLY.h" #include "convexhull.h" #include "dual.h" #include "dfs.h" #include "displayer.h" // Class that takes a PLYObject and obtains its single strip class Stripper { public: Stripper(PLYObject& ply); ~Stripper(); void makeDual(); void draw(); void preprocessBoundary(); void findMatching(); void findJunctionsLoopsPaths(); void connectJunctions(); void dfsTraversal(); void removeCutEdges(); /* Splitting */ void splitEdge(int e, bool update_matching = false); void splitEdge(int n1, int n2, bool update_matching = false); void doubleSplitEdge(int n); bool matchededge(int e); bool matchednode(int n); PLYObject& _ply; dual* _dual; dfs* _dfs; Displayer* _displayer; std::vector _matching; std::vector _matching2; std::vector _matching3; /* list of cut edges - DFS */ std::vector _cutedges; /* Junction node crap */ /* List of junction nodes */ std::vector _junctions; bool isJunction(int n); std::vector followTrail(int n, int e, int& ndest, int& edest); bool alreadyVisited(std::vector&, int e); void splitTrail(std::vector trail); void findAlternatingPath(std::vector trail); /* The junction node graph */ /* The nodes are in _junctions */ }; #endif