Package whistlesAndMoans
Class RejoiningFragmenter
java.lang.Object
whistlesAndMoans.DiscardingFragmenter
whistlesAndMoans.FragmentingFragmenter
whistlesAndMoans.RejoiningFragmenter
- All Implemented Interfaces:
RegionFragmenter
Join fragmented shapes back together again.
Probably not very efficient code since it goes through the
list in fragments and if it joins two fragments together,
it then removes one from the list, so the list gets progressively smaller.
- Author:
- Doug Gillespie
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
fragmentRegion
(ConnectedRegion connectedRegion) Fragment a connected regiongetFragment
(int fragment) Get a specific fragmentMethods inherited from class whistlesAndMoans.FragmentingFragmenter
createFragments, getNumFragments, isDiscardSmallOnes, setDiscardSmallOnes
-
Constructor Details
-
RejoiningFragmenter
-
-
Method Details
-
fragmentRegion
Description copied from interface:RegionFragmenter
Fragment a connected region- Specified by:
fragmentRegion
in interfaceRegionFragmenter
- Overrides:
fragmentRegion
in classFragmentingFragmenter
- Parameters:
connectedRegion
- region to fragment- Returns:
- number of fragments.
-
getFragment
Description copied from interface:RegionFragmenter
Get a specific fragment- Specified by:
getFragment
in interfaceRegionFragmenter
- Overrides:
getFragment
in classFragmentingFragmenter
- Parameters:
fragment
- fragment number (0 to getNumFragments);- Returns:
- the ith fragment
-