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

Method GetHoverString

Views/Infovis/vtkRenderedRepresentation.cxx:69–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69std::string vtkRenderedRepresentation::GetHoverString(vtkView* view, vtkProp* prop, vtkIdType cell)
70{
71 vtkSmartPointer<vtkSelection> cellSelect = vtkSmartPointer<vtkSelection>::New();
72 vtkSmartPointer<vtkSelectionNode> cellNode = vtkSmartPointer<vtkSelectionNode>::New();
73 cellNode->GetProperties()->Set(vtkSelectionNode::PROP(), prop);
74 cellNode->SetFieldType(vtkSelectionNode::CELL);
75 cellNode->SetContentType(vtkSelectionNode::INDICES);
76 vtkSmartPointer<vtkIdTypeArray> idArr = vtkSmartPointer<vtkIdTypeArray>::New();
77 idArr->InsertNextValue(cell);
78 cellNode->SetSelectionList(idArr);
79 cellSelect->AddNode(cellNode);
80 vtkSelection* converted = this->ConvertSelection(view, cellSelect);
81 std::string text = this->GetHoverStringInternal(converted);
82 if (converted != cellSelect)
83 {
84 converted->Delete();
85 }
86 return text;
87}
88
89void vtkRenderedRepresentation::PrintSelf(ostream& os, vtkIndent indent)
90{

Callers 1

UpdateHoverTextMethod · 0.45

Calls 10

SetSelectionListMethod · 0.80
DeleteMethod · 0.65
NewFunction · 0.50
SetMethod · 0.45
SetFieldTypeMethod · 0.45
SetContentTypeMethod · 0.45
InsertNextValueMethod · 0.45
AddNodeMethod · 0.45
ConvertSelectionMethod · 0.45

Tested by

no test coverage detected