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

Method TransformPoints

Common/Transforms/vtkAbstractTransform.cxx:146–165  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Transform a series of points.

Source from the content-addressed store, hash-verified

144//------------------------------------------------------------------------------
145// Transform a series of points.
146void vtkAbstractTransform::TransformPoints(vtkPoints* inPts, vtkPoints* outPts)
147{
148 this->Update();
149
150 vtkIdType n = inPts->GetNumberOfPoints();
151 vtkIdType m = outPts->GetNumberOfPoints();
152 outPts->SetNumberOfPoints(m + n);
153
154 vtkSMPTools::For(0, n,
155 [&](vtkIdType ptId, vtkIdType endPtId)
156 {
157 double point[3];
158 for (; ptId < endPtId; ++ptId)
159 {
160 inPts->GetPoint(ptId, point);
161 this->InternalTransformPoint(point, point);
162 outPts->SetPoint(m + ptId, point);
163 }
164 });
165}
166
167//------------------------------------------------------------------------------
168// Transform the normals and vectors using the derivative of the

Callers

nothing calls this directly

Calls 7

UpdateMethod · 0.95
ForFunction · 0.50
GetNumberOfPointsMethod · 0.45
SetNumberOfPointsMethod · 0.45
GetPointMethod · 0.45
SetPointMethod · 0.45

Tested by

no test coverage detected