| 346 | } |
| 347 | |
| 348 | vtkIdType vtkGraphItem::HitVertex(const vtkVector2f& pos) |
| 349 | { |
| 350 | vtkIdType numVert = static_cast<vtkIdType>(this->Internal->VertexPositions.size()); |
| 351 | for (vtkIdType v = 0; v < numVert; ++v) |
| 352 | { |
| 353 | if ((pos - this->Internal->VertexPositions[v]).Norm() < |
| 354 | this->Internal->VertexSizes[v] / this->Internal->CurrentScale[0] / 2.0) |
| 355 | { |
| 356 | return v; |
| 357 | } |
| 358 | } |
| 359 | return -1; |
| 360 | } |
| 361 | |
| 362 | bool vtkGraphItem::MouseMoveEvent(const vtkContextMouseEvent& event) |
| 363 | { |
no test coverage detected