| 67 | } |
| 68 | |
| 69 | std::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 | |
| 89 | void vtkRenderedRepresentation::PrintSelf(ostream& os, vtkIndent indent) |
| 90 | { |
no test coverage detected