----------------------------------------------------------------------------
| 1010 | |
| 1011 | //---------------------------------------------------------------------------- |
| 1012 | void vtkFastLabeledDataMapper::BuildLabelsInternal(vtkDataSet* input) |
| 1013 | { |
| 1014 | int i, j, numComp = 0, pointIdLabels = 0, activeComp = 0; |
| 1015 | vtkAbstractArray* abstractData = nullptr; |
| 1016 | vtkDataArray* numericData = nullptr; |
| 1017 | vtkStringArray* stringData = nullptr; |
| 1018 | if (input->GetNumberOfPoints() == 0) |
| 1019 | { |
| 1020 | return; |
| 1021 | } |
| 1022 | |
| 1023 | #ifdef vtkFastLabeledDataMapper_DEBUG |
| 1024 | vtkNew<vtkTimerLog> ttotal; |
| 1025 | ttotal->StartTimer(); |
| 1026 | vtkNew<vtkTimerLog> tfreetype; |
| 1027 | double tfreetypet = 0; |
| 1028 | vtkNew<vtkTimerLog> tindex; |
| 1029 | vtkNew<vtkTimerLog> tappend; |
| 1030 | double tappendt = 0.0; |
| 1031 | #endif |
| 1032 | |
| 1033 | vtkPointData* pd = input->GetPointData(); |
| 1034 | // figure out what to label, and if we can label it |
| 1035 | pointIdLabels = 0; |
| 1036 | switch (this->LabelMode) |
| 1037 | { |
| 1038 | case VTK_LABEL_IDS: |
| 1039 | { |
| 1040 | pointIdLabels = 1; |
| 1041 | }; |
| 1042 | break; |
| 1043 | case VTK_LABEL_SCALARS: |
| 1044 | if (pd->GetScalars()) |
| 1045 | { |
| 1046 | numericData = pd->GetScalars(); |
| 1047 | } |
| 1048 | break; |
| 1049 | case VTK_LABEL_VECTORS: |
| 1050 | if (pd->GetVectors()) |
| 1051 | { |
| 1052 | numericData = pd->GetVectors(); |
| 1053 | } |
| 1054 | break; |
| 1055 | case VTK_LABEL_NORMALS: |
| 1056 | if (pd->GetNormals()) |
| 1057 | { |
| 1058 | numericData = pd->GetNormals(); |
| 1059 | } |
| 1060 | break; |
| 1061 | case VTK_LABEL_TCOORDS: |
| 1062 | if (pd->GetTCoords()) |
| 1063 | { |
| 1064 | numericData = pd->GetTCoords(); |
| 1065 | } |
| 1066 | break; |
| 1067 | case VTK_LABEL_TENSORS: |
| 1068 | if (pd->GetTensors()) |
| 1069 | { |
no test coverage detected