Logo Search packages:      
Sourcecode: inkscape version File versions

bool Geom::ConvexHull::is_clockwise (  )  const

Is the convex hull clockwise? We use the definition of clockwise from point.h

Definition at line 225 of file convex-cover.cpp.

                               {
    if(is_degenerate())
        return true;
    Point first = boundary[0];
    Point second = boundary[1];
    for(std::vector<Point>::const_iterator it(boundary.begin()+2), e(boundary.end());
        it != e;) {
        if(SignedTriangleArea(first, second, *it) > 0)
            return false;
        first = second;
        second = *it;
        ++it;
    }
    return true;
}


Generated by  Doxygen 1.6.0   Back to index