/* private */ bool NodingValidator::hasInteriorIntersection(const LineIntersector& aLi, const Coordinate& p0, const Coordinate& p1) const { for (int i=0, n=aLi.getIntersectionNum(); i<n; i++) { const Coordinate &intPt=aLi.getIntersection(i); if (!(intPt==p0 || intPt==p1)) return true; } return false; }
void object::test<3>() { LineIntersector i; Coordinate p1(10, 10); Coordinate p2(20, 10); Coordinate q1(20, 10); Coordinate q2(30, 10); i.computeIntersection(p1, p2, q1, q2); ensure_equals(i.getIntersectionNum(), (int)LineIntersector::POINT_INTERSECTION); ensure_equals(i.getIntersectionNum(), 1); ensure("!isProper", !i.isProper()); ensure("hasIntersection", i.hasIntersection()); }