Skip to content

Commit

Permalink
Merge pull request #482 from danlipsa/add-vertex-cells
Browse files Browse the repository at this point in the history
Add vertex cells.
  • Loading branch information
mleotta committed May 19, 2021
2 parents b800f07 + d7a76cd commit 36b6a09
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions gui/WorldView.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
#include <vtkTimeStamp.h>
#include <vtkUnsignedCharArray.h>
#include <vtkUnsignedIntArray.h>
#include <vtkVertexGlyphFilter.h>
#include <vtkXMLImageDataReader.h>
#include <vtkXMLPolyDataWriter.h>

Expand Down Expand Up @@ -1034,6 +1035,14 @@ void WorldView::setMesh(vtkSmartPointer<vtkPolyData> mesh)
{
QTE_D();

if (mesh->GetNumberOfCells() == 0)
{
vtkNew<vtkVertexGlyphFilter> vertexFilter;
vertexFilter->SetInputData(mesh);
vertexFilter->Update();
mesh = vertexFilter->GetOutput();
}

d->mesh = mesh;

// Create mapper
Expand Down

0 comments on commit 36b6a09

Please sign in to comment.