SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
Functor to compare indices into a vector of EdgeFragments based on which fragment is above the other. More...
#include <Fragment.h>
Public Member Functions | |
EdgeFragmentComparator (FragmentArray &frag, SweeplinePosition &startPoint) | |
EdgeFragmentComparator (const EdgeFragmentComparator &other) | |
FragmentArray * | fragments () const |
Return the array of fragments the comparator indexes into. | |
bool | operator() (FragmentId a, FragmentId b) const |
Return true when line a lies to the left of and/or below line b for the current sweepLocation. More... | |
Public Attributes | |
FragmentArray * | m_sweptFragments |
SweeplinePosition * | m_sweepPoint |
Functor to compare indices into a vector of EdgeFragments based on which fragment is above the other.
bool smtk::session::polygon::EdgeFragmentComparator::operator() | ( | FragmentId | a, |
FragmentId | b | ||
) | const |
Return true when line a lies to the left of and/or below line b for the current sweepLocation.
When the sweep position is at an intersection point of 2 or more lines, we order the lines according to their behavior just to the left (or below, in the case of vertical lines) of the sweep position.
As noted by Boissonat and Preparata, predicates for testing relationships between lines require increased-precision operations according to the degree of the equations in the predicate.