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

Function FindNextValidSegment

Common/DataModel/vtkPolyLine.cxx:37–56  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

35
36//------------------------------------------------------------------------------
37inline vtkIdType FindNextValidSegment(
38 vtkPoints* points, vtkIdType npts, const vtkIdType* pointIds, vtkIdType start)
39{
40 vtkVector3d ps;
41 points->GetPoint(pointIds[start], ps.GetData());
42
43 vtkIdType end = start + 1;
44 while (end < npts)
45 {
46 vtkVector3d pe;
47 points->GetPoint(pointIds[end], pe.GetData());
48 if (ps != pe)
49 {
50 return end - 1;
51 }
52 ++end;
53 }
54
55 return npts;
56}
57
58namespace
59{ // anonymous namespace supporting sliding normal generation

Callers 1

SlidingNormalsOnLineFunction · 0.85

Calls 2

GetPointMethod · 0.45
GetDataMethod · 0.45

Tested by

no test coverage detected