Hi,everyone,
I want to dynamically draw a polygon in a vtkRenderWindow that contains the volume data. In this case, the polygon is closed and normal, but the drawing process will stuck because the volume data is also being rendered. Therefore, I created a new vtkRender to render the polygon. The vtkRender with the volume data is set to no render. If the rendering code is unchanged, the polygon will contain the triangle strips.
Can anyone give me some ideas or suggestions?
Wanted result
With triangle strips
//Points
vtkNew<vtkPoints> points1;
for (int i = 0; i < vecDisPts.size(); i++)
{
points1->InsertNextPoint(vecDisPts[i].GetX(), vecDisPts[i].GetY(), 0.0);
}
vtkNew<vtkCellArray> polys1;
polys1->InsertNextCell(points1->GetNumberOfPoints() + 1);
for (int i = 0; i < points1->GetNumberOfPoints(); i++)
{
polys1->InsertCellPoint(i);
}
polys1->InsertCellPoint(0);
//Polyline
m_pClipPolylinePolyData->SetPoints(points1);
m_pClipPolylinePolyData->SetLines(polys1);