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

Method CheckLine

Filters/General/vtkIntersectionPolyDataFilter.cxx:1805–1823  ·  view source on GitHub ↗

Check to make sure the line is unique

Source from the content-addressed store, hash-verified

1803
1804// Check to make sure the line is unique
1805int vtkIntersectionPolyDataFilter::Impl::CheckLine(
1806 vtkPolyData* pd, vtkIdType ptId1, vtkIdType ptId2)
1807{
1808 vtkSmartPointer<vtkIdList> pointCells1 = vtkSmartPointer<vtkIdList>::New();
1809 vtkSmartPointer<vtkIdList> pointCells2 = vtkSmartPointer<vtkIdList>::New();
1810
1811 pd->GetPointCells(ptId1, pointCells1);
1812 pd->GetPointCells(ptId2, pointCells2);
1813
1814 pointCells1->IntersectWith(pointCells2);
1815
1816 int unique = 1;
1817 if (pointCells1->GetNumberOfIds() > 0)
1818 {
1819 unique = 0;
1820 }
1821
1822 return unique;
1823}
1824
1825int vtkIntersectionPolyDataFilter::Impl::GetTransform(vtkTransform* transform, vtkPoints* points)
1826{

Callers 2

SplitCellMethod · 0.80

Calls 4

IntersectWithMethod · 0.80
NewFunction · 0.50
GetPointCellsMethod · 0.45
GetNumberOfIdsMethod · 0.45

Tested by

no test coverage detected