mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-05 01:49:02 +00:00
fix assumption that ANARIMapperVolume only consumed point data
This commit is contained in:
parent
35f5abcc17
commit
b7ef246789
@ -132,6 +132,8 @@ void ANARIMapperVolume::ConstructArrays(bool regenerate)
|
||||
const auto& cells = actor.GetCellSet();
|
||||
const auto& fieldArray = actor.GetField().GetData();
|
||||
|
||||
const bool isPointBased =
|
||||
actor.GetField().GetAssociation() == vtkm::cont::Field::Association::Points;
|
||||
const bool isStructured = cells.CanConvert<vtkm::cont::CellSetStructured<3>>();
|
||||
const bool isScalar = fieldArray.GetNumberOfComponentsFlat() == 1;
|
||||
|
||||
@ -140,7 +142,8 @@ void ANARIMapperVolume::ConstructArrays(bool regenerate)
|
||||
if (isStructured && isScalar)
|
||||
{
|
||||
auto structuredCells = cells.AsCellSet<vtkm::cont::CellSetStructured<3>>();
|
||||
auto pdims = structuredCells.GetPointDimensions();
|
||||
auto pdims =
|
||||
isPointBased ? structuredCells.GetPointDimensions() : structuredCells.GetCellDimensions();
|
||||
|
||||
VolumeArrays arrays;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user