// **************************************************************************** // Modifications: // Jeremy Meredith, Mon Feb 16 19:11:34 PST 2004 // Added polygonal cell support. // // Hank Childs, Thu Oct 21 07:52:31 PDT 2004 // Instead of duplicating code, just call a common function. // (Moved whole routine to new ConstructDataSet method with // CommonPointsStructure in signature). // // Brad Whitlock, Thu Mar 22 12:36:10 PDT 2012 // Call ConstructDataSetHelper. // // **************************************************************************** void vtkVolumeFromVolume::ConstructDataSet(vtkPointData *inPD, vtkCellData *inCD, vtkUnstructuredGrid *output, vtkPoints *pts) { if(pts->GetDataType() == VTK_FLOAT) ConstructDataSetHelper(inPD, inCD, output, VTK_FLOAT, this->numPrevPts, this->shapes, this->nshapes, this->pt_list, this->centroid_list, vtkPointAccessor<float>(pts)); else if(pts->GetDataType() == VTK_DOUBLE) ConstructDataSetHelper(inPD, inCD, output, VTK_DOUBLE, this->numPrevPts, this->shapes, this->nshapes, this->pt_list, this->centroid_list, vtkPointAccessor<double>(pts)); else ConstructDataSetHelper(inPD, inCD, output, VTK_FLOAT, this->numPrevPts, this->shapes, this->nshapes, this->pt_list, this->centroid_list, vtkGeneralPointAccessor(pts)); }
void vtkSurfaceFromVolume::ConstructPolyData(vtkPointData *inPD, vtkCellData *inCD, vtkPolyData *output, vtkPoints *pts) { if(pts->GetDataType() == VTK_FLOAT) ConstructPolyDataHelper(inPD, inCD, output, this->pt_list, this->tris, pts->GetDataType(), vtkPointAccessor<float>(pts)); else if(pts->GetDataType() == VTK_FLOAT) ConstructPolyDataHelper(inPD, inCD, output, this->pt_list, this->tris, pts->GetDataType(), vtkPointAccessor<double>(pts)); else ConstructPolyDataHelper(inPD, inCD, output, this->pt_list, this->tris, pts->GetDataType(), vtkGeneralPointAccessor(pts)); }