MCPcopy Create free account
hub / github.com/Kitware/VTK / LineSegmentsIntersect

Function LineSegmentsIntersect

Filters/General/vtkCellValidator.cxx:168–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168bool 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//------------------------------------------------------------------------------

Callers 2

NoIntersectingEdgesMethod · 0.85
TrianglesIntersectFunction · 0.85

Calls 2

IntersectionClass · 0.85
absFunction · 0.50

Tested by

no test coverage detected