vtkCellData *inPD=input->GetCellData();
vtkPointData *outPD=output->GetPointData();
vtkIdList *cellIds;
- float weight;
- float *weights;
+ vtkFloatingPointType weight;
+ vtkFloatingPointType *weights;
vtkDebugMacro(<<"Mapping cell data to point data");
cellIds->Delete();
return;
}
- weights = new float[VTK_MAX_CELLS_PER_POINT];
+ weights = new vtkFloatingPointType[VTK_MAX_CELLS_PER_POINT];
outPD->CopyAllocate(inPD,numPts);
vtkUnsignedCharArray* cellTypes = vtkUnsignedCharArray::New();
VISU::TVTKOutput* aDataSet = anIDMapper->GetVTKOutput();
aDataSet->Update();
- aDataSet->GetListOfUniqueCellTypes(cellTypes);
+
+// Fills cellTypes with list of unique cell types
+ unsigned char type;
+ vtkUnsignedCharArray *typesArray = aDataSet->GetCellTypesArray();
+ if (typesArray){
+ type = typesArray->GetValue(0);
+ cellTypes->InsertNextValue(type);
+ for (int cellId = 0; cellId < aDataSet->GetNumberOfCells(); cellId++){
+ type = typesArray->GetValue(cellId);
+ for (int i = 0; i < cellTypes->GetMaxId()+1; i++){
+ if (type != cellTypes->GetValue(i))
+ cellTypes->InsertNextValue(type);
+ else
+ break; //cell is not unique, return control to outer loop
+ }
+ }
+ }
+
for(vtkIdType anId = 0; anId < cellTypes->GetNumberOfTuples(); anId++){
const vtkIdType aType = (const vtkIdType)cellTypes->GetValue(anId);
if(aType == VTK_QUADRATIC_EDGE ||