SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
10 #ifndef smtk_session_polygon_internal_Neighborhood_h
11 #define smtk_session_polygon_internal_Neighborhood_h
13 #include "smtk/session/polygon/Operation.h"
14 #include "smtk/session/polygon/Resource.h"
15 #include "smtk/session/polygon/Session.h"
16 #include "smtk/session/polygon/internal/ActiveFragmentTree.h"
18 #include "smtk/common/UnionFind.h"
19 #include "smtk/model/Edge.h"
34 typedef std::vector<std::pair<smtk::model::Edge, bool>> OrientedEdges;
46 FragmentArray& fragments,
49 smtk::session::polygon::SessionPtr sess);
54 void getLoops(T evaluator);
77 const std::list<FragmentId>::iterator& ringA,
78 const std::list<FragmentId>::iterator& ringB);
81 const std::list<FragmentId>::iterator& ringA,
82 const std::list<FragmentId>::iterator& ringB,
85 const internal::Point& other);
87 void queueActiveEdge(FragmentId fragId,
EdgeFragment& frag);
88 void removeActiveEdge(FragmentId fragId);
89 void processFragmentEndEvents();
90 void processFragmentStartEvents();
95 RegionId traverseLoop(
96 OrientedEdges& result,
97 std::set<RegionId>& neighborRegions,
100 void dumpLoop(OrientedEdges& loopEdges, RegionId contained, std::set<RegionId>& neighborRegions);
102 void setDebugLevel(
int lvl) { m_debugLevel = lvl; }
107 return m_session->findStorage<T>(uid);
111 internal::Point m_nextPoint;
112 FragmentArray* m_fragments;
117 std::vector<FragmentId> m_fragmentsToQueue;
118 std::set<FragmentId> m_fragmentsToDeactivate;
119 std::list<FragmentId> m_ring;
120 std::set<std::pair<RegionId, RegionId>>
123 smtk::model::Resource::Ptr m_resource;
124 smtk::session::polygon::SessionPtr m_session;
125 int m_debugLevel{ 0 };
132 #endif // smtk_session_polygon_internal_Neighborhood_h
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
RegionId upperRegionJustBelow(FragmentId frag)
Return the region ID neighboring a fragment from below.
Definition: Neighborhood.cxx:105
The sweepline Interval Tree (IT), of active edge segments, is a set of offsets into the array of frag...
Definition: ActiveFragmentTree.h:25
std::set< SweepEvent > SweepEventSet
Sweep events ordered by their left-, lower-most point coordinates.
Definition: Fragment.h:34
void insertFragment(FragmentId fragId, EdgeFragment &frag, const internal::Point &other)
Insert frag where it belongs in the ring of fragments incident to m_point.
Definition: Neighborhood.cxx:460
void processNeighbors()
Process the neighborhood of one or more event endpoints.
Definition: Neighborhood.cxx:597
void removeDeactivatedEdges()
Process all edges passed to removeActiveEdge(). This is called each time (just before) the sweepline ...
Definition: Neighborhood.cxx:668
void relateNeighborhoods(FragmentId fA, EdgeFragment &fragA, bool isOutA, FragmentId fB, EdgeFragment &fragB, bool isOutB, RegionId region)
Relate a region between 2 fragments A & B which share a vertex x to neighborhoods just before and aft...
Definition: Neighborhood.cxx:192
void advanceSweeplineTo(const internal::Point &pt)
Advance the sweepline to the next event's point.
Definition: Neighborhood.cxx:662
RegionId lowerRegionJustAbove(FragmentId frag)
Return the region ID neighboring a fragment from above.
Definition: Neighborhood.cxx:96
std::map< RegionId, smtk::shared_ptr< Region > > RegionDefinitions
A map to hold each region's definition indexed by its UF region ID.
Definition: Fragment.h:39
bool isFragmentOutgoing(const EdgeFragment &frag)
Return the orientation of a fragment relative to the neighborhood.
Definition: Neighborhood.cxx:186
void assignAndMergeRegions(const std::list< FragmentId >::iterator &ringA, const std::list< FragmentId >::iterator &ringB)
The space between ringA and ringB is not interrupted; mark coedges of A/B as same region.
Definition: Neighborhood.cxx:341
Structure to hold information about a portion of an edge-segment forming part of an output loop.
Definition: Fragment.h:42
Represent the neighborhood of a sweepline point, x.
Definition: Neighborhood.h:41
Definition: Fragment.h:136
bool insertFragmentBetween(const std::list< FragmentId >::iterator &ringA, const std::list< FragmentId >::iterator &ringB, FragmentId fragId, EdgeFragment &frag, const internal::Point &other)
Insert fragId into m_ring if it is between ringA and ringB.
Definition: Neighborhood.cxx:386