MCPcopy Create free account
hub / github.com/Kitware/VTK / UpdateSelectionActors

Method UpdateSelectionActors

Views/Infovis/vtkParallelCoordinatesRepresentation.cxx:1609–1641  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1607}
1608
1609void vtkParallelCoordinatesRepresentation::UpdateSelectionActors()
1610{
1611 vtkSelection* selection = this->GetAnnotationLink()->GetCurrentSelection();
1612 int numNodes = selection->GetNumberOfNodes();
1613
1614 for (int i = 0; i < numNodes; i++)
1615 {
1616 while (i >= (int)this->I->SelectionData.size())
1617 {
1618 // initialize everything for drawing the selection
1619 vtkSmartPointer<vtkPolyData> polyData = vtkSmartPointer<vtkPolyData>::New();
1620 vtkSmartPointer<vtkActor2D> actor = vtkSmartPointer<vtkActor2D>::New();
1621 vtkSmartPointer<vtkPolyDataMapper2D> mapper = vtkSmartPointer<vtkPolyDataMapper2D>::New();
1622 mapper.TakeReference(this->InitializePlotMapper(polyData, actor));
1623
1624 this->I->SelectionData.push_back(polyData);
1625 this->I->SelectionMappers.push_back(mapper);
1626 this->I->SelectionActors.push_back(actor);
1627
1628 this->AddPropOnNextRender(actor);
1629 }
1630 }
1631
1632 for (int i = numNodes; i < (int)this->I->SelectionData.size(); i++)
1633 {
1634 this->RemovePropOnNextRender(this->I->SelectionActors[i]);
1635 this->I->SelectionData.pop_back();
1636 this->I->SelectionMappers.pop_back();
1637 this->I->SelectionActors.pop_back();
1638 }
1639
1640 this->BuildInverseSelection();
1641}
1642
1643//------------------------------------------------------------------------------
1644int vtkParallelCoordinatesRepresentation::ComputePointPosition(double* p)

Callers 1

RequestDataMethod · 0.95

Calls 12

InitializePlotMapperMethod · 0.95
BuildInverseSelectionMethod · 0.95
GetAnnotationLinkMethod · 0.80
AddPropOnNextRenderMethod · 0.80
pop_backMethod · 0.80
NewFunction · 0.50
GetCurrentSelectionMethod · 0.45
GetNumberOfNodesMethod · 0.45
sizeMethod · 0.45
TakeReferenceMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected