------------------------------------------------------------------------------
| 146 | |
| 147 | //------------------------------------------------------------------------------ |
| 148 | vtkPoints* vtkDataSet::GetPoints() |
| 149 | { |
| 150 | vtkWarningMacro("GetPoints() called on a dataset that does not define GetPoints." |
| 151 | "Don't modify this object."); |
| 152 | this->TempPoints = vtkSmartPointer<vtkPoints>::New(); |
| 153 | vtkNew<vtkDoubleArray> array; |
| 154 | array->SetNumberOfComponents(3); |
| 155 | array->SetNumberOfTuples(this->GetNumberOfPoints()); |
| 156 | vtkSMPTools::For(0, this->GetNumberOfPoints(), |
| 157 | [&](vtkIdType begin, vtkIdType end) |
| 158 | { |
| 159 | double x[3]; |
| 160 | for (vtkIdType pointId = begin; pointId < end; ++pointId) |
| 161 | { |
| 162 | this->GetPoint(pointId, x); |
| 163 | array->SetTypedTuple(pointId, x); |
| 164 | } |
| 165 | }); |
| 166 | this->TempPoints->SetData(array); |
| 167 | return this->TempPoints; |
| 168 | } |
| 169 | |
| 170 | //------------------------------------------------------------------------------ |
| 171 | // Compute the data bounding box from data points. |
nothing calls this directly
no test coverage detected