OSPRay: fail to render hexahedron meshes
vtkOSPRayTetrahedraMapperNode
is supposed to support hexahedron cells (and should be renamed I guess) when compiled against OSPRay >= 1.5.
However, it looks like the feature is not working.
After a quick look, at least one bug has been detected:
In VTK/Rendering/OSPRay/vtkOSPRayTetrahedraMapperNode.cxx:219
:
OSPData indicesData = ospNewData(this->Cells.size()/4,OSP_INT4,this->Cells.data(),0);
#if OSPRAY_VERSION_MAJOR == 1 && OSPRAY_VERSION_MINOR >= 5
ospSetData(this->OSPRayVolume, "indices", indicesData);
#else
ospSetData(this->OSPRayVolume, "tetrahedra", indicesData);
#endif
Should be replaced by:
#if OSPRAY_VERSION_MAJOR == 1 && OSPRAY_VERSION_MINOR >= 5
OSPData indicesData = ospNewData(this->Cells.size()/8,OSP_INT4,this->Cells.data(),0);
ospSetData(this->OSPRayVolume, "indices", indicesData);
#else
OSPData indicesData = ospNewData(this->Cells.size()/4,OSP_INT4,this->Cells.data(),0);
ospSetData(this->OSPRayVolume, "tetrahedra", indicesData);
#endif
A test should be added to check that the feature is working (this requires to upgrade OSPRay versions on testing machine).
Edited by Joachim Pouderoux