| 166 | } |
| 167 | |
| 168 | bool LineSegmentsIntersect(double p1[3], double p2[3], double q1[3], double q2[3], double tolerance) |
| 169 | { |
| 170 | double u, v; |
| 171 | if (vtkLine::Intersection(p1, p2, q1, q2, u, v) == vtkLine::Intersect) |
| 172 | { |
| 173 | if ((std::abs(u) > tolerance && std::abs(u - 1.) > tolerance) || |
| 174 | (std::abs(v) > tolerance && std::abs(v - 1.) > tolerance)) |
| 175 | { |
| 176 | return true; |
| 177 | } |
| 178 | } |
| 179 | return false; |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | //------------------------------------------------------------------------------ |
no test coverage detected