------------------------------------------------------------------------------
| 1196 | |
| 1197 | //------------------------------------------------------------------------------ |
| 1198 | unsigned long vtkWebGPUPolyDataMapper::GetCellAttributeByteSize( |
| 1199 | vtkWebGPUPolyDataMapper::CellDataAttributes attribute) |
| 1200 | { |
| 1201 | switch (attribute) |
| 1202 | { |
| 1203 | case CellDataAttributes::CELL_COLORS: |
| 1204 | if (this->HasCellAttributes[attribute]) |
| 1205 | { |
| 1206 | // are we using a single color value replicated over all cells? |
| 1207 | if (this->FieldDataTupleId > -1 && this->ScalarMode == VTK_SCALAR_MODE_USE_FIELD_DATA) |
| 1208 | { |
| 1209 | return this->CurrentInput->GetNumberOfCells() * this->Colors->GetNumberOfComponents() * |
| 1210 | sizeof(vtkTypeFloat32); |
| 1211 | } |
| 1212 | else |
| 1213 | { |
| 1214 | return this->Colors->GetDataSize() * sizeof(vtkTypeFloat32); |
| 1215 | } |
| 1216 | } |
| 1217 | |
| 1218 | break; |
| 1219 | |
| 1220 | case CellDataAttributes::CELL_NORMALS: |
| 1221 | if (this->HasCellAttributes[attribute]) |
| 1222 | { |
| 1223 | return this->CurrentInput->GetCellData()->GetNormals()->GetDataSize() * |
| 1224 | sizeof(vtkTypeFloat32); |
| 1225 | } |
| 1226 | |
| 1227 | break; |
| 1228 | |
| 1229 | default: |
| 1230 | break; |
| 1231 | } |
| 1232 | |
| 1233 | return 0; |
| 1234 | } |
| 1235 | |
| 1236 | //------------------------------------------------------------------------------ |
| 1237 | unsigned long vtkWebGPUPolyDataMapper::GetPointAttributeElementSize( |
no test coverage detected